# Help with simple formula

#### deletedalien

##### Well-known Member
Hi there just a quick question...

Why isn't this formula working???

=IF(IF(B3="Student Loans",1,2)=IF(G3="Student Loans",1,2),"ok","Check Campaign")

It should check if BOTH B3 and G3 say Student loans and if they BOTH say that then it should redutn ok otherwise check campaign,

which it does.... BUT

if i type any other 2 equal values on B3 and G3 it still returns ok....

and i need for it to make sure that it specifically read student loans there.

Any help is appreciated.

### Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

#### SlamDunk

##### New Member
Try this formula, it will do what you are trying to achieve.

=IF(AND(B3="Student Loans",G3="Student Loans"),"ok","Check Campaign")

Superb!

#### deletedalien

##### Well-known Member
could this be possible with 4 non contiguous ranges?

#### SlamDunk

##### New Member
Unfortunately my imagination is poor and I don't understand your question

#### deletedalien

##### Well-known Member
Sorry

It just came to my attention that a different part of my report requires me to check 4 different cells to make sure they all match Specifically B2, D2, G2, I2

#### My Aswer Is This

##### Well-known Member
Yes this would work:
=IF(AND(B3="Student Loans",G3="Student Loans",B21="Student Loans",G12="Student Loans"),"Ok","Check Campaign")

Last edited:

#### deletedalien

##### Well-known Member
Simply Brilliant.....

Thank you VERY much!

Replies
7
Views
329
Replies
20
Views
697
Replies
2
Views
121
Replies
7
Views
285
Replies
1
Views
212

1,171,065
Messages
5,873,580
Members
432,985
Latest member
leahw

### 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.

### Which adblocker are you using?

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