Lookup question

wibni

New Member
Joined
Jun 15, 2011
Messages
33
Hello,

I have the below table in Excel 2003.

Is it possible to create the entries under 'Site' in column I with a lookup?
I basically need an array with the values from B1:I2.
If one of the numbers has been found it should return the string from column A.
I tried VLookkup and HLookup but couldn't get it to work.

Excel Workbook
ABCDEFGHI
1GGM008028038055066073
2NMM005011021024032042048049
3
4
5RigSiteSite
6005NMM
7008GGM
8011NMM
9021NMM
10024NMM
11028GGM
12032NMM
13038GGM
14042NMM
15048NMM
16049NMM
17055GGM
18066GGM
19073GGM
20008GGM
21028GGM
Sheet1
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Rather than Vlookup, try IF - If it's in row 1, then give me A1, if it's in row 2, give me A2.

=IF(COUNTIF($1:$1,H7),$A$1,IF(COUNTIF($2:$2,H7),$A$2,""))
 
Last edited:
Upvote 0
Hello,

I have the below table in Excel 2003.

Is it possible to create the entries under 'Site' in column I with a lookup?
I basically need an array with the values from B1:I2.
If one of the numbers has been found it should return the string from column A.
I tried VLookkup and HLookup but couldn't get it to work.

Excel Workbook
ABCDEFGHI
1GGM008028038055066073
2NMM005011021024032042048049
3
4
5RigSiteSite
6005NMM
7008GGM
8011NMM
9021NMM
10024NMM
11028GGM
12032NMM
13038GGM
14042NMM
15048NMM
16049NMM
17055GGM
18066GGM
19073GGM
20008GGM
21028GGM
Sheet1

create your array somewhere else either in hidden columns or a hidden sheet, ensure that the data you want to "lookup" is the on in the first left hand column for ex

008 GGM
028 GGM
038 GGM


then in cell I6 use formula "=IF(ISERROR(VLOOKUP(I6,AB:AC,2,0)),"",(VLOOKUP(I6,AB:AC,2,0)))

You can then copy this formula down to the bottom of column I, it will only show values when it can find one to display, else it will be blank.
 
Upvote 0
Thank you for your replies.
The table is generated by our finance system so I can't create it somewhere else or in hidden columns.

What you suggested Expiry works. Thank you very much for that.
Is it possible to include more sites as well?
For example if I wanted to search through the first 4 rows:
GGM
NMM
MWA
KMC

Do I then just continue creating additional IF statements in the false section of the COUNTIF statement?

=IF(COUNTIF($1:$1,H8),$A$1,IF(COUNTIF($2:$2,H8),$A$2,IF(COUNTIF($3:$3,H8),$A$3,IF(COUNTIF($4:$4,H8),$A$4,""))))
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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