This is my function in google sheet:
=IF(NOT(ISBLANK(H2)),vlookup(H2,Tags!A2:B64,2,FALSE),'') and that's giving me the error: Formula parse error.
the function vlookup(H2,Tags!A2:B64,2,FALSE) works on its own however and returns a correct value
I'm sure that the syntax is correct but I can't figure out what's wrong.
The error was in the '' changing them to "" worked.
The correct query is:
=IF(NOT(ISBLANK(H2)),vlookup(H2,Tags!A2:B64,2,FALSE),"")
Related
I've been using =Cell("address",... to error check formulas I'm making to create a database and it's been working pretty well until I tried to scale up my index match formulas with some if statements.
I've narrowed the issue down to where I believe it's working as intended as long as the first statement in the if statement is true, yet if the calculation goes past that (even if the original formula is fine and returns a value) it will come back with #VALUE!.
EDIT: To be clear, the formula used above returns values without issue when not using the CELL-ADDRESS function involved. The formula also returns values when split up outside the IF-Statement.
I2=Valid
=CELL("address",IF($I$2="Valid",INDEX($I$2:$J$6,MATCH($U$1,$H$2:$H$6,0),MATCH($V$1,$I$1:$J$1,0)),IF($I$2="Invalid",INDEX($I$2:$J$6,MATCH($W$1,$H$2:$H$6,0),MATCH($V$1,$I$1:$J$1,0)),"Error")))
$I$2 is returned in the cell
I2=Invalid
=IF($I$2="Valid",INDEX($I$2:$J$6,MATCH($U$1,$H$2:$H$6,0),MATCH($V$1,$I$1:$J$1,0)),IF($I$2="Invalid",INDEX($I$2:$J$6,MATCH($W$1,$H$2:$H$6,0),MATCH($V$1,$I$1:$J$1,0)),"Error"))
#VALUE! is returned
Can anyone offer a fix for this or explain why it's happening and how to avoid it?
Any help would be appreciated.
Thanks!
I am using the following excel formula to determine the value for a cell. I keep getting a "#VALUE!" error. Can anyone assist?
=OR(IF(AND(P3="NewEE",LEFT(O3,1)="D"),"DENTAL",IF(AND(P3="BEN2",LEFT(O3,1)="H"),"MEDICAL",
IF(AND(P3="BEN3",LEFT(O3,1)="V"),"VISION"))),IF(AND(Q3="NewEE",LEFT(O3,1)="D"),"DENTAL",
IF(AND(Q3="BEN2",LEFT(O3,1)="H"),"MEDICAL",IF(AND(Q3="BEN3",LEFT(O3,1)="V"),"VISION"))),
IF(AND(R3="NewEE",LEFT(O3,1)="D"),"DENTAL",IF(AND(R3="BEN2",LEFT(O3,1)="H"),"MEDICAL",
IF(AND(R3="BEN3",LEFT(O3,1)="V"),"VISION"))))
EXAMPLE 1:
EXAMPLE 2:
You want to nest all the ifs and do not use the OR():
=IF(AND(P2="NewEE",LEFT(O2,1)="D"),"DENTAL",IF(AND(P2="BEN2",LEFT(O2,1)="H"),"MEDICAL",IF(AND(P2="BEN3",LEFT(O2,1)="V"),"VISION",IF(AND(Q2="NewEE",LEFT(O2,1)="D"),"DENTAL",IF(AND(Q2="BEN2",LEFT(O2,1)="H"),"MEDICAL",IF(AND(Q2="BEN3",LEFT(O2,1)="V"),"VISION",IF(AND(R2="NewEE",LEFT(O2,1)="D"),"DENTAL",IF(AND(R2="BEN2",LEFT(O2,1)="H"),"MEDICAL",IF(AND(R2="BEN3",LEFT(O2,1)="V"),"VISION","")))))))))
Hi I am trying to write a formula where if cell (J$4) = 1120 then it would run one statement, whereas if cell (J$4) = 1120s it would run another. I am using index-match to lookup the appropriate value. However, I can't seem to get my formula to work and I was wondering if you guys can find my error. The error is 'you've entered too many arguments for this function'. Any help would be appreciated! Thank you!
formula:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$f$300,MATCH("L 22a",B1HY3!$f$3:$f$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5),0),0)
Always try to follow parentheses' colors it is quite useful when handling with large formulas,furthermore try always to evaluate your formulas to check where the error is.
It worked for me:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5))),0)
It was nessesary to close the parenthesis of the second if
I am trying to get VLOOKUP to return a blank if an error is returned that should show #NA
I have tried multiple functions such as IF(ISNA....) as was done on Microsoft's website and most currently
=IF(IFNA(VLOOKUP('Order Form'!B27,'Delivery Calculator'!A14:C17,3,FALSE)),"",VLOOKUP('Order Form'!B27,'Delivery Calculator'!A14:C17,3,FALSE))
The vlookup: VLOOKUP('Order Form'!B27,'Delivery Calculator'!A14:C17,3,FALSE) works by itself except that I get an NA which I wanted to change to a blank.
Thanks for any help!
With your help and my reading of the Office.com IFNA page, how about:
=IFNA(VLOOKUP('Order Form'!B27,'Delivery Calculator'!A14:C17,3,FALSE),"")
I've always had trouble with this one over the years! I don't seem able to get the OR function in Excel to work.
In my model, the cell E46 should contain either a valid Postcode or the value "none". Unfortunately I have also encountered a "#value" in E46 so have written the following formula to trap this error and return "None" if encountered:
=IF(OR(E46="None",ISERROR(E46)),"None",VLOOKUP(E46, List,2,FALSE))
Trouble is, I still get #value returned by this formula when E46 contains #value even though I think I am trapping it!
All the help texts suggest I have written the formula correctly – I cannot see what I am doing wrong. Any helpful suggestions gratefully received.
You can't use OR when there might be an error in there (because the OR function will give an error in that case - from E46="None" part), try trapping the error first with nested IFs, e.g.
=IF(ISERROR(E46),"None",IF(E46="None",E46,VLOOKUP(E46, List,2,FALSE)))
You'd still get an error if E46 isn't in List......
If you have Excel 2007 or greater you can use IFERROR like
=IFERROR(IF(E46="None",E46,VLOOKUP(E46, List,2,FALSE)),"None")