If, then formula

Brew

Well-known Member
Joined
Sep 29, 2003
Messages
1,569
How do I create a formula to express the following:
if T4=N, then V4=N,but
if T4=Y and AE4 does not equal 3, then V4=Y, but
if T4=Y and AE4=3, then V4=N
 

Excel Facts

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

How about ..

=IF((T4="Y")*(AE4=3),"N",IF(TF="Y","Y",IF(TF="N","N","No Criteria Set")))
 
Upvote 0
This gives me a result of #NAME?, when the result should be "N", probably because of the TF in the formula:
=IF((T4="Y")*(AE4=3),"N",IF(TF="Y","Y",IF(TF="N","N","No Criteria Set")))
 
Upvote 0
Brew

You could try:
=IF(OR(T4="N",AE4=3),"N","Y")
though you haven't said what you want to happen if T4 is not Y or N.
 
Upvote 0
T4 is always Y or N.
Wow, Hotpepper, this solution is very concise and works. Thanks
Given the first quote and HOTPEPPER's concise solution, why not go one step further (or is it one step less)?
=IF(AE4=3,"N",T4)
 
Upvote 0
yep, that is a working solution, because it will always be either a Y or N in the cell.
 
Upvote 0

Forum statistics

Threads
1,213,537
Messages
6,114,216
Members
448,554
Latest member
Gleisner2

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