Adding More Conditions to an Existing Formula

meppwc

Active Member
Joined
May 16, 2003
Messages
409
I have a formula that currently works correctly that is located in cell L2:
=IFERROR(VLOOKUP(B2,'Site Assignments'!$A$1:$D$131,4,FALSE),"ASK JON FOR INFO")

Now I want to add logic that says if cells F2 and I2 are blank, then leave L2 blank
I think what I need to add to the formula above is the following logic:
IF(AND(ISBLANK(F2), ISBLANK (I2),"",

So I came up with this formula:
=IF(AND(ISBLANK(F2), ISBLANK (I2),""),IFERROR(VLOOKUP(B2,'Site Assignments'!$A$1:$D$131,4,FALSE),"ASK JON FOR INFO"))

But that formula is returning #NAME ?
I suspect that by adding ISBLANK that might be triggering the error, but I am not sure
What am I doing incorrectly?
 

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
7,829
Office Version
365
Platform
Windows
You misplaced your brackets:

=IF(AND(ISBLANK(F2),ISBLANK(I2)),"",IFERROR(VLOOKUP(B2,'Site Assignments'!$A$1:$D$131,4,FALSE),"ASK JON FOR INFO"))
 

meppwc

Active Member
Joined
May 16, 2003
Messages
409
That is not triggering an error........which is good news............but it is still not giving the result that I am looking for............which is a blank cell...............I am not sure if this matters or not, but cells F2 and I2 do have formulas in them
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,845
Office Version
365
Platform
Windows
I am not sure if this matters or not, but cells F2 and I2 do have formulas in them
What EXACTLY are those formulas?
Can you post an example of each?
 

meppwc

Active Member
Joined
May 16, 2003
Messages
409
F2 contains
=IFERROR(LOOKUP(9.99999999999999E+307,SEARCH(A2,$C$2:$C$600),$C$2:$C$600),"")
I2 contains
=IFERROR(LOOKUP(9.99999999999999E+307,SEARCH(A2,$D$2:$D$600),$C$2:$C$600),"")
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,845
Office Version
365
Platform
Windows
Try this instead:
Code:
[COLOR=#333333]=IF(AND(F2="",I2=""),"",IFERROR(VLOOKUP(B2,'Site Assignments'!$A$1:$D$131,4,FALSE),"ASK JON FOR INFO"))[/COLOR]
 

meppwc

Active Member
Joined
May 16, 2003
Messages
409
That did it !!!!!..........thanks so much for all the help !!!!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,845
Office Version
365
Platform
Windows
You are welcome. Glad we were able to help.

Yes, Excel doesn't consider the empty string ("") to be the same as a blank.
 

Forum statistics

Threads
1,086,116
Messages
5,387,927
Members
402,089
Latest member
Exceliamus

Some videos you may like

This Week's Hot Topics

Top