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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

oldbrewer

Well-known Member
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))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,200
Messages
5,835,948
Members
430,396
Latest member
dzifna

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