Home

Running a IF(OR(AND fomula off a Vlookup

%3CLINGO-SUB%20id%3D%22lingo-sub-708033%22%20slang%3D%22en-US%22%3ERunning%20a%20IF(OR(AND%20fomula%20off%20a%20Vlookup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-708033%22%20slang%3D%22en-US%22%3E%3CP%3Ein%20cell%20E2%2C%20i%20have%20a%20Vlookup%3A%20%3DVLOOKUP(%24C%3A%24C%2C'Vlookup%20Scott'!%24C%242%3A%24K%2410%2C3%2CFALSE)%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20i%20need%20to%20run%20a%20If(OR(AND%20statement%20in%20cell%20Q2%3A%26nbsp%3B%3DIF(OR(AND(E2%3D%22R%22%2CF2%3D8.25%2CP2%26lt%3B%3D1.4%2CP2%26gt%3B%3D1.2)%2CAND(E2%3D%22R%22%2CF2%3D9.5%2CP2%26lt%3B%3D1.6%2CP2%26gt%3B%3D1.2)%2CAND(E2%3D%22P%22%2CF2%3D8.25%2CP2%26lt%3B%3D1.5%2CP2%26gt%3B%3D1.3)%2CAND(E2%3D%22P%22%2CF2%3D9.5%2CP2%26lt%3B%3D1.7%2CP2%26gt%3B%3D1.3))%2C%22PASS%22%2C%22FAIL%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eit%20will%20only%20work%20when%20i%20have%20E2%20as%20a%20regular%20text%20cell.%20is%20there%20a%20way%20to%20run%20Q2%20with%20the%20vlookup%20in%20E2%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-708033%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELogical%20Statement%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Evlookup%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-708075%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20a%20IF(OR(AND%20fomula%20off%20a%20Vlookup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-708075%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F363135%22%20target%3D%22_blank%22%3E%40stimetzs%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20does%20your%20VLOOKUP%20return%3F%20It%20shall%20work%20as%3C%2FP%3E%0A%3CPRE%3E%3DVLOOKUP(%24C%241%2C'Vlookup%20Scott'!%24C%242%3A%24K%2410%2C3%2CFALSE)%20%3C%2FPRE%3E%0A%3CP%3Etaking%20first%20element%20from%20C%3AC%20to%20lookup.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20point%20perhaps%20in%20your%20range%20not%20exact%20text%20as%20%22R%22%20but%20something%20like%20%22R%20%22%2C%20you%20may%20check%20manually.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20general%20it%20doesn't%20matter%20for%20your%20second%20formula%20how%20the%20value%20in%20E2%20appeared%2C%20by%20formula%20or%20added%20manually.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-708084%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20a%20IF(OR(AND%20fomula%20off%20a%20Vlookup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-708084%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20Vlookup%20brings%20back%20what%20i%20need%20it%20to%2C%20but%20the%20IF(OR(AND%20does%20not.%20it%20looks%20like%20it%20only%20works%20when%20i%20enter%20it%20manually.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-708235%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20a%20IF(OR(AND%20fomula%20off%20a%20Vlookup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-708235%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20think%20i%20have%20it.%20it%20wasn't%20reading%20the%20numbers%20as%20numbers%2C%20and%20instead%20read%20them%20as%20a%20text%20statement%20off%20of%20the%20vlookup.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-708373%22%20slang%3D%22en-US%22%3ERe%3A%20Running%20a%20IF(OR(AND%20fomula%20off%20a%20Vlookup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-708373%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F363135%22%20target%3D%22_blank%22%3E%40stimetzs%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOkay%2C%20so%20far%20so%20good.%20I%20didn't%20catch%20why%20numbers%20since%20in%20your%20OR%20formula%20you%20compare%20E2%20with%20texts%20as%20%22R%22%20and%20%22P%22.%20But%20that%20doesn't%20matter%20if%20finally%20it%20works.%3C%2FP%3E%3C%2FLINGO-BODY%3E
stimetzs
New Contributor

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

@stimetzs 

 

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.

@Sergei Baklan 

 

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.

@Sergei Baklan 

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.

@stimetzs 

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.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies