Help with nested IF

tojomojo

New Member
Joined
Feb 8, 2019
Messages
31
I am trying to test a cell ad see if it is blank and if it is return a blank the target cell. If it isnt blank I want the rest of the statement to run.

My syntax is wrong somewhere.....

Code:
IF(C4 = "","",(OR(AND(TODAY() <> E4,F4="Complete"),AND(TODAY() < E4,F4="In progress")),LOOKups!$D$2,LOOKups!$D$3))

???Thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
If you need to do two IF tests then you need two IFs.

=IF(C4 = "","",IF(OR(AND(TODAY() <> E4,F4="Complete"),AND(TODAY() < E4,F4="In progress")),LOOKups!$D$2,LOOKups!$D$3))
 
Upvote 0
Code:
IF(C4 = "","",(OR(AND(TODAY() <> E4,F4="Complete"),AND(TODAY() < E4,F4="In progress"))))

This is one formula, the rest is not included.

If you want a nested formula, you could use IFS() (if your Excel version allows for it).
Code:
IFS(test1, value, test2, value, test3, value...)

Otherwise, you are missing a second (nested) IF() function within the IF() function you already have.

e.g.

Code:
IF(C4="","",IF(OR(AND(TODAY() <> E4,F4="Complete"),AND(TODAY() < E4,F4="In progress"))=TRUE,[COLOR=#333333]LOOKups!$D$2,LOOKups!$D$3))[/COLOR]
 
Upvote 0
That works well and does not populate the target field if C4 is blank - thanks........but it only ever display $D$2 now even if TODAY() < E4. I need this to input $D$3 into the target cell
 
Upvote 0
Code:
IF(OR(AND(TODAY() <> E4,F4="Complete"),AND(TODAY() < E4,F4="In progress"))=TRUE,LOOKups!$D$2,LOOKups!$D$3)

Let me deconstruct the formula for you

Code:
IF(test, value if test = true, value if test = false)
[COLOR=#ff0000]OR([/COLOR][COLOR=#0000cd]AND([/COLOR]test1,test2[COLOR=#0000CD])[/COLOR], [COLOR=#008000]AND([/COLOR]test3,test4[COLOR=#008000])[/COLOR][COLOR=#ff0000])[/COLOR] 'if either test1 and test2 are true, or if test3 and test4 are true

So, in what I wrote, you check if either TODAY() <> E4 and F4="Complete", or if TODAY() < E4 and F4="In progress"
If either of these is true, then you want the value from LOOKups!$D$2
If neither are true, then you want LOOKups!$D$3
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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