I am attempting to write a formula to convert approximately 600 geologic measurements to a more useful format and I am failing miserably. The equation I have is below:

=IF(D2="NW","sum{360-C2}",IF(D2="SW","sum{180+C2}",IF(D2="SE","sum{180-C2}",IF(D2="NE","C2"))))

What I am needing the equation to compute is the following:

If input in D2 is "NW", then value shown in F2 will be 360-value in C2

If input in D2 is "SW", then value shown in F2 will be 180+value in C2

If input in D2 is "SE", then value shown in F2 will be 180-value in C2

If input in D2 is "NE", then value shown is F2 will be the value in C2

I have tried making the sum(360-C2) into an equation but it did not fix the problem. Is there something I am overlooking?

Thank you for any help.

I'm not sure how you constructed your formula, but this version of it should do what you need:

=IF(D2="NW",360-C2,IF(D2="SW",180+C2,IF(D2="SE",180-C2,IF(D2="NE",C2,"No value in D2"))))

I added "No value in D2" for the situation where there is no value in D2. Without this, the formula would return FALSE.

## Add new comment