# Or condition for vlookup output

Occasional Contributor

# Or condition for vlookup output

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

# Re: Or condition for vlookup output

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

# Betreff: Or condition for vlookup output

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.

# Re: Or condition for vlookup output

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

# Re: Or condition for vlookup output

an example file (without sensitive data) would be advantageous ... for you and for those who would like / are allowed to help

# Re: Or condition for vlookup output

@Nikolino Please find the sample file

# Re: Or condition for vlookup output

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.

# Re: Or condition for vlookup output

Please provide formula for that one

# Re: Or condition for vlookup output

Select the area with the left mouse button pressed.
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.

# Re: Or condition for vlookup output

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

# Re: Or condition for vlookup output

=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)

# Re: Or condition for vlookup output

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.