IF statement is not working while comparing Text

Sun11

New Member
Hi, here is the problem. In following table at the place of "Angle" I fetch data using following formula.
Code:
``=IF(A2 = "<<<","Ingress",LEFT(A2, SEARCH(" ",A2,1)))``

 Description Angle Aspect Dg <<< Ingress Trine Venus Trine

<tbody>
</tbody>

Now at "Aspect Dg" I tried using following formula with IF statement but its not working.
Code:
``=IF(B2 ="Ingress","None",IF(B2 ="Trine", 120,IF(B2 ="Conjunction",0,IF(B2 ="Opposition",180,IF(B2 ="Square", 90, 60)))))``

It always showing me 60, if "Angle" is not "Ingress"

Regards

Last edited:

Excel Facts

Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I just copied and pasted your sample & formula, I get 120?

It is your 1st formula which is incorrect, it is returning a space at the end "Trine "

Try
=IF(A2 = "<<<","Ingress",LEFT(A2, SEARCH(" ",A2,1)-1))

It is your 1st formula which is incorrect, it is returning a space at the end "Trine "

Try
=IF(A2 = "<<<","Ingress",LEFT(A2, SEARCH(" ",A2,1)-1))

Thank you so much i corrected my first formula & it worked!! )

You're welcome.

Replies
19
Views
2K
Replies
0
Views
131
Replies
1
Views
163
Replies
2
Views
682

1,196,329
Messages
6,014,680
Members
441,835
Latest member
rthomas268

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back