Using an IF condition in a VLOOKUP formula

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
I am trying to figure out logic to combine an IF condition into the outcome of a VLOOKUP formula
Column A of "Worksheet A" is a list of serial numbers
Column B of "Worksheet A" is where a formula will be that looks for the value in column A against a table of serial numbers in column A of "Worksheet B" and display the value found

=VLOOKUP(A2,'Worksheet B'!$A$1:$M$12,1,FALSE)

The formula above in cell B2 of Worksheet A works correctly.
But in column 13 of Worksheet B (column M), the cells may be blank or may contain the word "EXCEPTION"

I want to modify the above formula to display "EXCEPTION" if the word exists. If no word exists then the formula will return the value searched on is it currently does.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try:
Code:
=IF([COLOR=#333333]VLOOKUP(A2,'Worksheet B'!$A$1:$M$12,13,FALSE)="EXCEPTION","EXCEPTION",[/COLOR][COLOR=#333333]VLOOKUP(A2,'Worksheet B'!$A$1:$A$12,1,FALSE))[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top