Quick help with IF Statement

golfnut019

Board Regular
Joined
Nov 11, 2005
Messages
58
=IF(ISBLANK(P6574),VLOOKUP(G6574,'HC-CID'!A$2:I$65185,8,FALSE),IF(Q6574>37809,VLOOKUP(G6574,'HC-LID2'!A$2:I$65185,8,FALSE),VLOOKUP(G6574,'HC-LID'!A$2:I$65185,8,FALSE)))


Here's what's going on :

the isblank part is pretty self-explanatory.

I want the formula to check the data, and if it's greater than 12/23/2005, it'll look for the G value in the HC-LID2 sheet and if it's less than or equal 12/23/2005, it'll go to the HC-LID sheet.

I keep getting a #N/A for dates less than or equal to 12/23/2005 although when i manually look up the G value in the HC-LID sheet it's there.

Is there anything fundamentally wrong with the formula?


Thanks
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

golfnut019

Board Regular
Joined
Nov 11, 2005
Messages
58
To make it easier, if the value in column P is not blank, I run IF(Q6574>37809,VLOOKUP(G6574,'HC-LID2'!A$2:I$65185,8,FALSE),VLOOKUP(G6574,'HC-LID'!A$2:I$65185,8,FALSE))) part of the whole formula.

Do I need parantheses to distinguish this part of the formula as the false part of the first IF statement?

I can't seem to get around this.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
Make sure the dates are true dates, that is, numbers. First try to clean up with ASAP Utilities the lookup tables before considering any other possibilities.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,435
Messages
5,572,085
Members
412,441
Latest member
kelethymos
Top