Formula with multiple conditions (IF AND statements)

janema

Board Regular
Joined
Nov 28, 2022
Messages
117
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2011
  5. 2010
Platform
  1. Windows
  2. Mobile
I can figure out how to make this formula work. This is what I actually need it to do, but as I started writing the formula, I realized it wasn't going to work.

What I'm attempting:

If column AN equals "N" and column AL = "Hourly"
If column AN equals "E" and column AL = "Salary"


So, if both of the conditions above are met, then it's "OK," otherwise, it needs to be "CHECK"

I'm not sure if excel can actually do that, but thought I'd ask the experts on here. :) I started to write a IF AND formula, but just couldn't quite figure it out. Here was my initial attempt:

=IF(AND(AN57="N",AL57="Hourly", IF(AND(AN57="S",AL57="Salary","OK"),"CHECK"))

1683743830657.png



Please help! Thank you in advance for your guidance and expertise!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
How about
Excel Formula:
=IF(or(AND(AN57="N",AL57="Hourly"),AND(AN57="E",AL57="Salary")),"OK","CHECK")
 
Upvote 0
Solution
Try

Excel Formula:
=IF(AND(OR(AN57="N",AN57="E"),OR(AL57="Hourly",AL57="Salary")),"OK","CHECK")
 
Upvote 0

Forum statistics

Threads
1,215,382
Messages
6,124,620
Members
449,175
Latest member
Anniewonder

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top