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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
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,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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