Nick_Shl
Returning Member

Get your taxes done using TurboTax

Found this on Reddit:


I solved this issue. Here's an example of the final formatted CSV. Make sure it does not have control+M characters at the end of each row using vi or some other text editor that shows those.

 

Currency Name,Purchase Date,Cost Basis,Date sold,Proceeds

BTC,9/20/19,104.76,7/27/20,97.28

XLM,3/12/20,1000,4/28/20,1414.87

 

I used Excel functions to take the Coinbase transaction history CSV and convert it into this format. This is what I did.

NOTE: This ASSUMES your CSV is alternating exactly 1 Buy / 1 Sell on each row. If you bought multiple times and then sold, double check your doc and manually fix it in those instances. Also, you'll have to exclude any rows (obviously) for sells that took place in the wrong tax year.

  1. Remove the BS lines (leave the txn header row for now)

  2. Paste these headers into cols L - P: Currency Name,Purchase Date,Cost Basis,Date sold,Proceeds

  3. Starting on the first Sell txn (should be row 3), set the following excel functions as values further off to the right in the CSV file.

  4. Set value of L3 to: =IF(B3="Sell",C3,"")

  5. Set value of M3 to: =DATEVALUE(LEFT(IF(B3="Sell",A2,""),10))

  6. Set value of N3 to: =IF(B3="Sell",G2,"")

  7. Set value of O3 to: =DATEVALUE(LEFT(IF(B3="Sell",A3,""),10))

  8. Set value of P3 to: =IF(B3="Sell",G3,"")

  9. Drag down the formulas through your sheet

  10. Highlight the date columns and format->cells and choose the date format that is mm/dd/yy

  11. Copy and paste these values to a new sheet (paste values only)

  12. Sort the doc, ascending, by Purchase Date, expand selection.

  13. Delete the blank rows.

  14. Save the doc using Save As and select Windows Comma Separated (this one surprisingly gave me no weird control+M characters and no trailing commas when I look at it using vi or other text editor)