Fetching user IDs

Jonam711

New Member
Joined
Jun 11, 2022
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hello - I have base data were there are 2 columns, A - list of services which are handled by employees. B - emp IDs. one employee may have multiple services. Now I have another sheet were I have only the services and I need to get the emp IDs in a row.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
assuming services and employee lists are on Worksheet1!A2:B200 , and the services without IDs listed on Worksheet2 starting at Worksheet2!A2.
AND
There is no duplication of services on worksheet1

In cell Worksheet2!b2 put this formula


Excel Formula:
=VLOOKUP(A2,Worksheet1!$A$1:$B$200,2,0)

other similar Functions you can use are INDEX-Match, and XLOOKUP.
and copy down.
 
Upvote 0
assuming services and employee lists are on Worksheet1!A2:B200 , and the services without IDs listed on Worksheet2 starting at Worksheet2!A2.
AND
There is no duplication of services on worksheet1

In cell Worksheet2!b2 put this formula


Excel Formula:
=VLOOKUP(A2,Worksheet1!$A$1:$B$200,2,0)

other similar Functions you can use are INDEX-Match, and XLOOKUP.
and copy down.
Thank you mate but worksheet 1 services have duplicates that is one employee can have multiple services and vice versa.
 
Upvote 0
So, I'm confused. How do you know that which combo of AA E10001, AA E10002 is to be matched with AA on Worksheet2? How do you do it in your head?
Or maybe my example was inaccurate. Why don't you post some data and expectations?

Mr. Excel has a tool that allows the forum to post mini worksheets. It is called xl2bb add in (link below). If you cannot use that, then please post as a copyable TABLE, not an image.

Thanks.
 
Upvote 0
So, I'm confused. How do you know that which combo of AA E10001, AA E10002 is to be matched with AA on Worksheet2? How do you do it in your head?
Or maybe my example was inaccurate. Why don't you post some data and expectations?

Mr. Excel has a tool that allows the forum to post mini worksheets. It is called xl2bb add in (link below). If you cannot use that, then please post as a copyable TABLE, not an image.

Thanks.
Sorry for the confusion mate, let me put differently say worksheet 1, column A is the services- A1 & A2 are Bloomberg share market A3 Verizon north data. Their respective employee column B, B1 E1001 B2 E1002 B3 E1003. in worksheet 2 we have column A services- A1 Bloomberg share market, A2 Verizon north data. Now we need to pull employees E1001 & E1002 in B1 as they both have Bloomberg, B2 only E1003
 
Upvote 0
Maybe use the FILTER function.

Sheet1
Book1
AB
1ServicesID
2A200
3A45
4B60
5C45
6D62
7B78
8R75
9T200
10G60
11B400
12C55
Sheet1


Sheet2
Book1
ABCDEFGHI
1ServicesABCDRTGX
22006045627520060No Record
3457855
4400
Sheet2
Cell Formulas
RangeFormula
B2:B3,E2:I2,D2:D3,C2:C4B2=FILTER(Sheet1!$B$2:$B$12,Sheet1!$A$2:$A$12=B$1,"No Record")
Dynamic array formulas.
 
Upvote 0
Solution
then maybe this:

Mr Excel Questions 71.xlsm
ABCDE
1ServicesEmployee
2AAG1892AEI1430
3ABC1436AJF1109
4ACA1983AOH1984
5ADG1909ATB1437,F1395
6AEI1430AYG1967,C1720
7AFI1138BDF1314,E1790
8AGE1194BII1430
9AHI1163CCF1270
10AIA1315CHC1942
11AJF1109
12AKF1395
13ALE1334
14AMI1059
15ANB1108
16AOH1984
17APC1720
18AQC1983
19ARC1577
20ASE1051
21ATB1437
22AUE1790
23AVB1795
24AWC1820
25AXF1286
26AYG1967
27AZJ1581
28BAG1626
29BBH1996
30BCF1698
31BDF1314
32BEG1892
33BFC1436
34BGA1983
35BHG1909
36BII1430
37BJI1138
38BKE1194
39AQI1163
40ARA1315
41ASF1109
42ATF1395
43AUE1334
44AVI1059
45AWB1108
46AXH1984
47AYC1720
48AZC1983
49BAC1577
50BBE1051
51BCB1437
52BDE1790
53BEG1645
54CAD1056
55CBC1114
56CCF1270
57CDC1164
58CEH1192
59CFB1040
60CGF1870
61CHC1942
62CIB1819
63CJG1625
64CKJ1912
65CLA1436
66CMF1323
67CNF1201
68COF1536
69CPE1857
70CQJ1297
71CRF1242
72CSE1905
73CTD1371
74CUF1867
75CVI1102
76CWJ1781
77CXG1381
78CYG1476
79CZI1845
80DAI1444
81DBH1295
82DCJ1421
83DDD1541
84DEB1855
85DFE1567
86DGH1841
87DHJ1088
88DID1047
89DJA1588
90DKI1819
91DLC1882
92DME1607
93DNE1226
94DOF1009
95DPG1264
96DQA1303
97DRF1258
98DSE1157
99DTG1347
100DUE1328
101DVD1893
102DWD1273
103DXB1044
104DYC1619
105DZH1227
106EAI1469
107EBG1198
108ECE1012
109EDB1734
110EEA1715
111EFB1576
112EGD1128
113EHE1917
114EIJ1225
115EJC1904
116EKA1340
117ELJ1013
118EMJ1342
119ENF1458
120EOE1131
121EPH1560
122EQH1811
123ERI1118
124ESC1354
125ETF1479
126EUH1834
127EVI1618
128EWB1020
129EXJ1391
130EYJ1308
131EZE1239
132FAD1907
133FBJ1685
134FCA1109
135FDI1559
136FEH1347
137FFE1776
138FGG1616
139FHJ1379
140FIC1372
141FJB1785
142FKE1308
143FLC1339
144FMC1585
145FNF1440
146FOF1585
147FPF1123
148FQF1552
149FRB1202
150FSD1169
151FTF1644
152FUA1724
153FVD1378
154FWD1551
155FXE1951
156FYE1817
157FZG1932
158GAB1352
159GBD1201
160GCD1920
161GDA1651
162GED1894
163GFD1120
164GGF1585
165GHA1473
166GIG1839
167GJA1462
168GKD1782
169GLC1513
170GMC1252
171GNG1506
172GOC1517
173GPF1240
174GQB1719
175GRE1059
176GSI1879
177GTJ1082
178GUE1723
179GVD1776
180GWI1076
181GXF1095
182GYA1471
183GZD1724
184HAI1592
185HBG1149
186HCG1920
187HDC1247
188HEF1104
189HFA1733
190HGB1554
191HHE1958
192HID1865
193HJH1445
194HKF1949
195HLG1909
196HMH1324
197HNE1691
198HOI1635
199HPC1826
200HQJ1353
201
Jonam711
Cell Formulas
RangeFormula
E2:E10E2=TEXTJOIN(",",,TRANSPOSE(TAKE(FILTER($A$2:$B$200,$A$2:$A$200=D2),,-1)))
 
Upvote 0
Maybe use the FILTER function.

Sheet1
Book1
AB
1ServicesID
2A200
3A45
4B60
5C45
6D62
7B78
8R75
9T200
10G60
11B400
12C55
Sheet1


Sheet2
Book1
ABCDEFGHI
1ServicesABCDRTGX
22006045627520060No Record
3457855
4400
Sheet2
Cell Formulas
RangeFormula
B2:B3,E2:I2,D2:D3,C2:C4B2=FILTER(Sheet1!$B$2:$B$12,Sheet1!$A$2:$A$12=B$1,"No Record")
Dynamic array formulas.
 
Upvote 0
then maybe this:

Mr Excel Questions 71.xlsm
ABCDE
1ServicesEmployee
2AAG1892AEI1430
3ABC1436AJF1109
4ACA1983AOH1984
5ADG1909ATB1437,F1395
6AEI1430AYG1967,C1720
7AFI1138BDF1314,E1790
8AGE1194BII1430
9AHI1163CCF1270
10AIA1315CHC1942
11AJF1109
12AKF1395
13ALE1334
14AMI1059
15ANB1108
16AOH1984
17APC1720
18AQC1983
19ARC1577
20ASE1051
21ATB1437
22AUE1790
23AVB1795
24AWC1820
25AXF1286
26AYG1967
27AZJ1581
28BAG1626
29BBH1996
30BCF1698
31BDF1314
32BEG1892
33BFC1436
34BGA1983
35BHG1909
36BII1430
37BJI1138
38BKE1194
39AQI1163
40ARA1315
41ASF1109
42ATF1395
43AUE1334
44AVI1059
45AWB1108
46AXH1984
47AYC1720
48AZC1983
49BAC1577
50BBE1051
51BCB1437
52BDE1790
53BEG1645
54CAD1056
55CBC1114
56CCF1270
57CDC1164
58CEH1192
59CFB1040
60CGF1870
61CHC1942
62CIB1819
63CJG1625
64CKJ1912
65CLA1436
66CMF1323
67CNF1201
68COF1536
69CPE1857
70CQJ1297
71CRF1242
72CSE1905
73CTD1371
74CUF1867
75CVI1102
76CWJ1781
77CXG1381
78CYG1476
79CZI1845
80DAI1444
81DBH1295
82DCJ1421
83DDD1541
84DEB1855
85DFE1567
86DGH1841
87DHJ1088
88DID1047
89DJA1588
90DKI1819
91DLC1882
92DME1607
93DNE1226
94DOF1009
95DPG1264
96DQA1303
97DRF1258
98DSE1157
99DTG1347
100DUE1328
101DVD1893
102DWD1273
103DXB1044
104DYC1619
105DZH1227
106EAI1469
107EBG1198
108ECE1012
109EDB1734
110EEA1715
111EFB1576
112EGD1128
113EHE1917
114EIJ1225
115EJC1904
116EKA1340
117ELJ1013
118EMJ1342
119ENF1458
120EOE1131
121EPH1560
122EQH1811
123ERI1118
124ESC1354
125ETF1479
126EUH1834
127EVI1618
128EWB1020
129EXJ1391
130EYJ1308
131EZE1239
132FAD1907
133FBJ1685
134FCA1109
135FDI1559
136FEH1347
137FFE1776
138FGG1616
139FHJ1379
140FIC1372
141FJB1785
142FKE1308
143FLC1339
144FMC1585
145FNF1440
146FOF1585
147FPF1123
148FQF1552
149FRB1202
150FSD1169
151FTF1644
152FUA1724
153FVD1378
154FWD1551
155FXE1951
156FYE1817
157FZG1932
158GAB1352
159GBD1201
160GCD1920
161GDA1651
162GED1894
163GFD1120
164GGF1585
165GHA1473
166GIG1839
167GJA1462
168GKD1782
169GLC1513
170GMC1252
171GNG1506
172GOC1517
173GPF1240
174GQB1719
175GRE1059
176GSI1879
177GTJ1082
178GUE1723
179GVD1776
180GWI1076
181GXF1095
182GYA1471
183GZD1724
184HAI1592
185HBG1149
186HCG1920
187HDC1247
188HEF1104
189HFA1733
190HGB1554
191HHE1958
192HID1865
193HJH1445
194HKF1949
195HLG1909
196HMH1324
197HNE1691
198HOI1635
199HPC1826
200HQJ1353
201
Jonam711
Cell Formulas
RangeFormula
E2:E10E2=TEXTJOIN(",",,TRANSPOSE(TAKE(FILTER($A$2:$B$200,$A$2:$A$200=D2),,-1)))
Thank you so much mate that worked
 
Upvote 0
T
Maybe use the FILTER function.

Sheet1
Book1
AB
1ServicesID
2A200
3A45
4B60
5C45
6D62
7B78
8R75
9T200
10G60
11B400
12C55
Sheet1


Sheet2
Book1
ABCDEFGHI
1ServicesABCDRTGX
22006045627520060No Record
3457855
4400
Sheet2
Cell Formulas
RangeFormula
B2:B3,E2:I2,D2:D3,C2:C4B2=FILTER(Sheet1!$B$2:$B$12,Sheet1!$A$2:$A$12=B$1,"No Record")
Dynamic array formulas.
Thank you bro that helped perfect!
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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