there is no easy way to do this. depending on how the CSV file looks like and what information it contains it can be a lot of different approaches. i have not used GDAX to be know it, but usually they have a column saying buy or sell indicating the type of your order that was filled.
with some conditions you may be able to do it.
=if(Logical_Test,Value_if_true)
you can get the value like this then find the other matching values. for example you find buy order then find the sell order matching it using the AND operator.
=if(AND(test1,test2),Value_if_true))
and finally use these values to get the final result which is profit or loss.