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:
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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))
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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