IF Function with Multiple Variables

mminchev

New Member
Joined
Feb 16, 2018
Messages
23
Hi,

I am trying to create an IF Function that looks at 8 columns of data and if there is a "Y" on any row the functions returns a date.

EXAMPLE:

DATA.

[TABLE="width: 480"]
<colgroup><col width="64" style="width: 48pt;" span="10"> <tbody>[TR]
[TD="width: 64, bgcolor: #2F75B5"]Date[/TD]
[TD="width: 64, bgcolor: yellow"]Days Since Date[/TD]
[TD="width: 64, bgcolor: red"]Extra [/TD]
[TD="width: 64, bgcolor: red"]New[/TD]
[TD="width: 64, bgcolor: red"]Old[/TD]
[TD="width: 64, bgcolor: red"]Super New[/TD]
[TD="width: 64, bgcolor: red"]Not New[/TD]
[TD="width: 64, bgcolor: red"]Super Old[/TD]
[TD="width: 64, bgcolor: red"]Mega New[/TD]
[TD="width: 64, bgcolor: red"]Super
[/TD]
[/TR]
[TR]
[TD="bgcolor: white"]2/15/19[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]Y[/TD]
[TD="bgcolor: transparent"]Y[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: white"]2/16/19[/TD]
[TD="bgcolor: white"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]

So the IF Functions is in the yellow row and it looks at each row and if there is a Y anwhere In a row it gives me the days since the Date column.

I tried this: =IF(OR(AND(C3="Y", D3="Y", E3="Y", F3="Y", G3="Y", H3="Y", I3="Y", J3="Y")), TODAY()-A3, "") BUT IT DOESNT WORK

HELP!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How about
=IF(COUNTIF(C3:J3,"Y")>0, TODAY()-A3, "")
 
Upvote 0
Try this, just amended yours as i believe you dont need the AND().

=IF(OR(C3="Y", D3="Y", E3="Y", F3="Y", G3="Y", H3="Y", I3="Y", J3="Y"), TODAY()-A3, "")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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