Simple IF with 2 criteria...

pete234

Active Member
Joined
Feb 10, 2004
Messages
419
=IF((AND([Status]="New",[Age]>2,1)

AND says not enough criteria.

First part (w/0 AND) works fine on it's own and will return "1" if the field is "New".
But using AND or joining with "," keeps giving me error if I want to also evaluate if the Age column >2.
What is the correct syntax to return the value 1 if both Status is "New" and Age is >2 but leave blank otherwise?
Any help appreciated dax alternative is fine too.

=IF([Status]="New",1,IF([Age]>2,1))

This gives everything as 1.
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,223,933
Messages
6,175,477
Members
452,646
Latest member
tudou

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