Lookup a value across 4 columns?

BrettOlbrys1

Board Regular
Joined
May 1, 2018
Messages
128
Office Version
  1. 365
Platform
  1. Windows
This is a similar question to one I asked previously, but slightly different. I have a source file with 7,000 rows of data in each cell across columns A - Z. Each row corresponds to a specific person (therefore there are 7,000 employees). For each person, there is a unique sales code in column P, a different unique sales code in Q, a different unique sales code in R, and a different unique sales code in S (each person has 4 unique sales codes). Therefore, there are 28,000 unique sales codes in total.

When one of the 28,000 sales codes shows up in a report, I want to identify the Salesperson whose code was used. The Salesperson's name is in column B of the source file.

How do I look across columns P, Q, R, and S for a specific sales code and return the value in column B of that same row?

Thanks

Brett
 
That's right, although the names will be listed where the formula is, not in X2
Just curious, why did you refer to the whole column in B:B, but limit it from 2 to 10000 in the others? Also, don't I need to add "$" to each variable other than X2 to ensure my lookup ranges don't change?
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
That's right, although the names will be listed where the formula is, not in X2
I just noticed that there are actually some blanks where a sales code could be, could that cause this #NUM issue if there is a blank in the range? For example, the Sales Code columns could look like this:

P
Q
R
S
123452345645678
11111222223333344444
987657654365432

Even when I reference a specific row where I KNOW the sales code is listed in the DATA tab and I try to lookup that Sales code from my results tab, I still get the #NUM issue.
 
Upvote 0
I just noticed that there are actually some blanks where a sales code could be, could that cause this #NUM issue if there is a blank in the range? For example, the Sales Code columns could look like this:

P
Q
R
S
123452345645678
11111222223333344444
987657654365432

Even when I reference a specific row where I KNOW the sales code is listed in the DATA tab and I try to lookup that Sales code from my results tab, I still get the #NUM issue.
I think the Sales Codes in the source table are formatted wrong because when I brought them outside the table and multiplied them by 1, and then referenced those new cells, the formula worked. Thanks for your collaboration to troubleshoot the issue!
 
Upvote 0
Glad it's sorted & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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