Highlighted
New Contributor

# Running a IF(OR(AND fomula off a Vlookup

in cell E2, i have a Vlookup: =VLOOKUP(\$C:\$C,'Vlookup Scott'!\$C\$2:\$K\$10,3,FALSE)

and i need to run a If(OR(AND statement in cell Q2: =IF(OR(AND(E2="R",F2=8.25,P2<=1.4,P2>=1.2),AND(E2="R",F2=9.5,P2<=1.6,P2>=1.2),AND(E2="P",F2=8.25,P2<=1.5,P2>=1.3),AND(E2="P",F2=9.5,P2<=1.7,P2>=1.3)),"PASS","FAIL")

it will only work when i have E2 as a regular text cell. is there a way to run Q2 with the vlookup in E2?

4 Replies
Highlighted

# Re: Running a IF(OR(AND fomula off a Vlookup

What does your VLOOKUP return? It shall work as

`=VLOOKUP(\$C\$1,'Vlookup Scott'!\$C\$2:\$K\$10,3,FALSE) `

taking first element from C:C to lookup.

Another point perhaps in your range not exact text as "R" but something like "R ", you may check manually.

In general it doesn't matter for your second formula how the value in E2 appeared, by formula or added manually.

Highlighted

# Re: Running a IF(OR(AND fomula off a Vlookup

the Vlookup brings back what i need it to, but the IF(OR(AND does not. it looks like it only works when i enter it manually.

# Re: Running a IF(OR(AND fomula off a Vlookup

I think i have it. it wasn't reading the numbers as numbers, and instead read them as a text statement off of the vlookup.

Highlighted

# Re: Running a IF(OR(AND fomula off a Vlookup

Okay, so far so good. I didn't catch why numbers since in your OR formula you compare E2 with texts as "R" and "P". But that doesn't matter if finally it works.