Vlookup formula with Offset

bill_s1416

Board Regular
Joined
Feb 12, 2003
Messages
103
Sheet A ('Customers Alignment'):
--------------------------------------
column A- name of sales representative
column B - customer ID
(Not sorted in any particular order. So, a sales rep could be listed in row 5, 27, etc)

Sheet B ('Sales Rep Lists'):
------------------------------
cell 'A1' drop-down selection of sales rep name.
I need below that to list the customers of the sales rep selected in cell A1 in a continuous list, even though the data is randomly sorted on sheet A. Can this be done with a single formula (maybe with an Vlookup and/or an Offset?)
:unsure:
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try the following formula which needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

'Sales Rep Lists'!B1, copied down:

Code:
=IF(ROWS(B$1:B1)<=COUNTIF('Customers Alignment'!$A$1:$A$100,$A$1),INDEX('Customers Alignment'!$B$1:$B$100,SMALL(IF('Customers Alignment'!$A$1:$A$100=$A$1,ROW('Customers Alignment'!$A$1:$A$100)-ROW('Customers Alignment'!$A$1)+1),ROWS(B$1:B1))),"")

Adjust the ranges accordingly.

Hope this helps!
 
Upvote 0
Sheet A ('Customers Alignment'):
--------------------------------------
column A- name of sales representative
column B - customer ID
(Not sorted in any particular order. So, a sales rep could be listed in row 5, 27, etc)

Sheet B ('Sales Rep Lists'):
------------------------------
cell 'A1' drop-down selection of sales rep name.
I need below that to list the customers of the sales rep selected in cell A1 in a continuous list, even though the data is randomly sorted on sheet A. Can this be done with a single formula (maybe with an Vlookup and/or an Offset?)
:unsure:
Could you just use AutoFilter on the data in the original 'Customers Alignment' sheet? Using the AutoFilter on column A would give you the list.
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

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