Adding More Conditions to an Existing Formula

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
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?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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"))
 
Upvote 0
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
 
Upvote 0
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?
 
Upvote 0
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),"")
 
Upvote 0
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]
 
Upvote 0
That did it !!!!!..........thanks so much for all the help !!!!
 
Upvote 0
You are welcome. Glad we were able to help.

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

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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