# If, then formula

#### Brew

##### Well-known Member
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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi there,

=IF((T4="Y")*(AE4=3),"N",IF(TF="Y","Y",IF(TF="N","N","No Criteria Set")))

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")))

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.

Perhaps:

=IF(AE4=3,"N",T(T4))

Thanks Peter. T4 is always Y or N. This solutions works fine

Wow, Hotpepper, this solution is very concise and works. Thanks

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)

I had that originally, but it returns a 0 if T4 is blank.

yep, that is a working solution, because it will always be either a Y or N in the cell.

Replies
3
Views
233
Replies
7
Views
234
Replies
0
Views
133
Replies
8
Views
301
Replies
3
Views
109

1,214,525
Messages
6,120,051
Members
448,940
Latest member
mdusw

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