Lookup..IFError..Then

tofer

New Member
Joined
Jun 21, 2015
Messages
4
Can you help me?

Sheet 1 -My cheat sheet :
A1 Red - B1 Group A
A2 White - B2 Group B
A3 Blue - B3 Group A

Sheet 2 - Report:
A1 Red, B1 White, C1 Blue, D1 Green

Need code for the following:
lookup value (Sheet 2 - Row 1)
table (Sheet 1 - Columns A and B)
index number 2 (Column B)

If error: Highlight cell (example: highlight D1 above)
Then: Msg box "Please update Sheet 1 and then try again..."
Exit

Note: I don't want to see any error or #N/A :oops:
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
11,005
Clear as mud to me - look up value sheet2 row 1 - is A1 Red in a cell or are all 4 in one cell

or if you lookup A2 white you want B2 Group B returned ?

I can see if D1 green is tried an error will come back

=if(iserror(vlookup("D1 Green",mytable,2)),"please update sheet1 and try again",vlookup("D1 Green",mytable,2))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,316
Members
414,053
Latest member
Dual Showman

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
Top