Or condition for vlookup output

%3CLINGO-SUB%20id%3D%22lingo-sub-1577679%22%20slang%3D%22en-US%22%3EOr%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577679%22%20slang%3D%22en-US%22%3EFor%20my%20condition%20if%20suppose%20vlookup%20has%20two%20specific%20output%20based%20on%20that%20I%20need%20to%20condition%20with%20if%20how%20it%20is%20possible%3CBR%20%2F%3EFormula%3A%20Vlookup(A2%2C%20C%3AD%2C2%2Cfalse)%20this%20will%20produce%20either%20%23N%2FA%20or%20-%20as%20output%20including%20some%20other%20outputs%20as%20well.%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20the%20above%20formula%20how%20can%20I%20condition%20it%20for%20if%20output%20is%20NA%20means%20put%20letter%20NO-REC%2C%20-%20means%20put%20AST%20please%20help%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1577679%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%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577739%22%20slang%3D%22en-US%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577739%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F585099%22%20target%3D%22_blank%22%3E%40Nandhu19940%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIFERROR(VLOOKUP(A2%2C%20C%3AD%2C%202%2C%20FALSE)%2C%20%22NO-REC%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577749%22%20slang%3D%22de-DE%22%3ESubject%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577749%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F585099%22%20target%3D%22_blank%22%3E%40Nandhu19940%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EAs%20far%20as%20I%20have%20understood%20the%20problem%20definition%20correctly%20or%20have%20translated%20it%2C%20these%20formulas%20could%20help%20you.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EThis%20can%20be%20used%20to%20suppress%20the%20error%20message%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EISNA(VLOOKUP(%24A-2.%24C%3A%24D%2C2%2CFALSE))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3Ewith%20this%20formula%20your%20desired%20text%20should%20be%20appear%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3DIF(ISERROR(VLOOKUP(A-2%2C%24C%3A%24D%2C2%2C0))%2C%22%20NO-REC%22%2CVLOOKUP(A-2%2C%24C%3A%24D%2C2%2C0))%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%221%202%203%204%205%206%207%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E*%20Provided%20that%20I%20have%20correctly%20translated%20the%20formulas%20into%20English.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Beware%20of%20scammers%20posting%20fake%20support%20numbers%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577937%22%20slang%3D%22en-US%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577937%22%20slang%3D%22en-US%22%3EThanks%20for%20stopping%20by%20and%20answering%20my%20query%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20formula%20will%20produce%20two%20output%3CBR%20%2F%3E1)%20%23N%2FA%3CBR%20%2F%3E2)%20-%3CBR%20%2F%3ESo%20need%20to%20provide%20condition%20based%20on%20my%20above%20two%20outputs%3CBR%20%2F%3EIf%20%23N%2FA%20or%20-%20occurs%20I%20need%20to%20do%20another%20lookup%20I%20don't%20know%20how%20to%20provide%20or%20or%20if%20condition%20in%20this%20scenario%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1577975%22%20slang%3D%22de-DE%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1577975%22%20slang%3D%22de-DE%22%3Ean%20example%20file%20(without%20sensitive%20data)%20would%20be%20advantageous%20...%20for%20you%20and%20for%20those%20who%20would%20like%20%2F%20are%20allowed%20to%20help%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1583807%22%20slang%3D%22en-US%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583807%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3BPlease%20find%20the%20sample%20file%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1583864%22%20slang%3D%22de-DE%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583864%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F585099%22%20target%3D%22_blank%22%3E%40Nandhu19940%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3ECan%20it%20help%20you%20like%20this%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22%22%3EIs%20with%20conditional%20formatting.%3C%2FSPAN%3E%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22%22%3EIf%20it%20doesn't%20help%2C%20please%20give%20us%20a%20short%20feedback.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Beware%20of%20scammers%20posting%20fake%20support%20numbers%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1583906%22%20slang%3D%22en-US%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583906%22%20slang%3D%22en-US%22%3EPlease%20provide%20formula%20for%20that%20one%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1583930%22%20slang%3D%22de-DE%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583930%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F585099%22%20target%3D%22_blank%22%3E%40Nandhu19940%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3ESelect%20the%20area%20with%20the%20left%20mouse%20button%20pressed.%3C%2FSPAN%3E%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22%22%3EStart%20menu%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EConditional%20formatting%3C%2FSPAN%3E%3CBR%20%2F%3ENew%3CSPAN%3Erule%3C%2FSPAN%3E%3CBR%20%2F%3EFormat%20only%20cells%20that%3CSPAN%20class%3D%22%22%3Econtain%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22%22%3EFirst%20dropdown%20(from%20left%20to%20right)%20menu%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Eselection%3A%20error%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E(all%20other%20dropdowns%20will%20disappear)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EPress%20Format%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Efont%3C%2FSPAN%3E%3CBR%20%2F%3ESelect%20color%3CSPAN%20class%3D%22%22%3Ewhite%20(click)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EOK%3C%2FSPAN%3E%3CBR%20%2F%3Eand%20press%3CSPAN%3EOK%20again%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Edone%20...%20the%20magic%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Beware%20of%20scammers%20posting%20fake%20support%20numbers%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1583950%22%20slang%3D%22en-US%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1583950%22%20slang%3D%22en-US%22%3EReally%20appreciating%20your%20efforts%20here%20%2C%20I%20need%20to%20implement%20in%20macro%20so%20must%20need%20formula%20for%20that%20second%20reason%20is%20if%20suppose%20my%20vlookup%20output%20has%20those%20two%20output%20I%20need%20to%20do%20another%20vlookup%20that's%20why%20I'm%20asking%20for%20formula%20so%20that%20will%20implement%20in%20my%20macro%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1584093%22%20slang%3D%22de-DE%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1584093%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F585099%22%20target%3D%22_blank%22%3E%40Nandhu19940%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIFERROR(LOOKUP(9.1%2F(D2%3AD10%3DH4)%2F(E2%3AE10%3DI4)%2CF2%3AF10)%2CIF(ISTEXT(H4)%2CH4%2CI4))%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EPrecondition%2C%20that%20all%20cells%20are%20formatted%20%2F%20set%20to%20%22Standard%22.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EHere%20is%20an%20example%20file%20with%20the%20choco%20...%20is%20also%20my%20weakness...%20Hahaha%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20find%20this%20helpful%2C%20please%20mark%20it%20as%20%22Best%20Answer%22%20and%20as%20Like%20(click%20thumbs%20up)%2C%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1584148%22%20slang%3D%22de-DE%22%3ERe%3A%20Or%20condition%20for%20vlookup%20output%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1584148%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EDownloaded%20a%20text%20file%20in%20this%20direction%20from%20a%20German%20website.%3C%2FSPAN%3E%3CBR%20%2F%3E%20%3CSPAN%20class%3D%22%22%3EIs%20really%20a%20good%20example.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20third-party%20products%20that%20these%20article%20discusses%20are%20manufactured%20by%20companies%20that%20are%20independent%20of%20me.%20I%20makes%20no%20warranty%2C%20implied%20or%20otherwise%2C%20about%20the%20performance%20or%20reliability%20of%20these%20products.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Beware%20of%20scammers%20posting%20fake%20support%20numbers%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor
For my condition if suppose vlookup has two specific output based on that I need to condition with if how it is possible
Formula: Vlookup(A2, C:D,2,false) this will produce either #N/A or - as output including some other outputs as well.

For the above formula how can I condition it for if output is NA means put letter NO-REC, - means put AST please help
11 Replies

@Nandhu19940 

=IFERROR(VLOOKUP(A2, C:D, 2, FALSE), "NO-REC")

@Nandhu19940 

 

As far as I have understood the problem definition correctly or have translated it, these formulas could help you.

 

This can be used to suppress the error message

ISNA(VLOOKUP($A$2,$C:$D,2,FALSE))

 

with this formula your desired text should be appear

=IF(ISERROR(VLOOKUP(A$2,$C:$D,2,0))," NO-REC",VLOOKUP(A$2,$C:$D,2,0))

* Provided that I have correctly translated the formulas into English.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

* Beware of scammers posting fake support numbers here.

Thanks for stopping by and answering my query,

This formula will produce two output
1) #N/A
2) -
So need to provide condition based on my above two outputs
If #N/A or - occurs I need to do another lookup I don't know how to provide or or if condition in this scenario
an example file (without sensitive data) would be advantageous ... for you and for those who would like / are allowed to help

@Nikolino Please find the sample file 

@Nandhu19940 

 

Can it help you like this?
Is with conditional formatting.
If it doesn't help, please give us a short feedback.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

* Beware of scammers posting fake support numbers here.

Please provide formula for that one

@Nandhu19940 

 

Select the area with the left mouse button pressed.
Start menu
Conditional formatting
New rule
Format only cells that contain
First dropdown (from left to right) menu
selection: error

(all other dropdowns will disappear)
Press Format
font
Select color white (click)
OK
and press OK again
done ... the magic

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

* Beware of scammers posting fake support numbers here.

Really appreciating your efforts here , I need to implement in macro so must need formula for that second reason is if suppose my vlookup output has those two output I need to do another vlookup that's why I'm asking for formula so that will implement in my macro

@Nandhu19940 

 

=IFERROR(LOOKUP(9,1/(D2:D10=H4)/(E2:E10=I4),F2:F10),IF(ISTEXT(H4),H4,I4))

Precondition, that all cells are formatted / set to "Standard".

 

Here is an example file with the choco ... is also my weakness...hahaha

 

If you find this helpful, please mark it as "Best Answer" and as Like (click thumbs up), it will be beneficial to more Community members reading here.

 

Nikolino

I know I don't know anything (Socrates)

 

@Nikolino 

 

Downloaded a text file in this direction from a German website.
Is really a good example.

 

The third-party products that this article discusses are manufactured by companies that are independent of me. I makes no warranty, implied or otherwise, about the performance or reliability of these products.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

* Beware of scammers posting fake support numbers here.