TOCOL() and VLOOKUP() help needed

realtoast

New Member
Joined
Nov 24, 2015
Messages
47
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I have a large table (smaller sample here), there I have an Employee ID, Employee Name, and Dependent ID and Dependent Name, all on the same row. There are instances where there are more than one dependent, where subsequent dependents are on an additional row that also includes another instance of the Employee ID and Employee Name. My challenge: I need to have each individual in their own row. In other words, move that first dependent down to their own row. The Employee ID will also show on each row to bind dependents to their respective employee.

I figure I can use TOCOL() to create a dynamic list of unique IDs, each in their own respect row. It seems that VLOOKUP() would be the next step to put names adjacent to their unique IDs in the new table, but I am failing at this. Do you have a different solution, or the proper way to do this with VLOOKUP()?

Thanks.

EEIDDEPIDNAMEDEPENDENT NAMETOCOL()How?
5388Y8M8Smith, Steven D5388Y8M8
=VLOOKUP(BF4,Census34[[EEID]:[DEPID]],3,FALSE)​
Y92Q22339Jones, Marcas AY92Q22339
#REF!​
Y553QQ3A42MKing,TimothyRaymond Stephen KingY553QQ3A4
#REF!​
Y553QQ3A4Y78QM786King,TimothyJenny King2M
Y553QQ3A4QY8398970King,TimothyChandra KingY553QQ3A4
YAM844958Klien, MaisaY78QM786
#N/A​
MAA323A88Burrows, Charles EY553QQ3A4
#REF!​
5AM33QYM8Kling, Kevin WQY8398970
#N/A​
83883A5MMount, MeghanYAM844958
#REF!​
Q33Y2839ATurley, BushraMAA323A88
#REF!​
MA59M9MQ5MA3QAA439Bond, Jacqueline SDavid Bond5AM33QYM8
#REF!​
239Q3YA54Parsley, Eric A83883A5M
#REF!​
55MM95988Campbell, JamesQ33Y2839A
#REF!​
22A538Q54Wilson, Annabelle MMA59M9MQ5
#REF!​
MY33MAQ58M2345M89MTerry, JaneeJohn Terry, Jr.MA3QAA439
#N/A​
84AMMYQMChen, Ming239Q3YA54
#REF!​
2Y5459Q4AChen, Xi55MM95988
#REF!​
2Q28454YMChen, Ma22A538Q54
#REF!​
MYMA2A5A48YM35QMY2Compton, NimrahMuhammad ComptonMY33MAQ58
#REF!​
M2345M89M
84AMMYQM
2Y5459Q4A
2Q28454YM
MYMA2A5A4
8YM35QMY2
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about
Fluff.xlsm
ABCDEFG
1EEIDDEPIDNAMEDEPENDENT NAME
25388Y8M8Smith, Steven D5388Y8M8Smith, Steven D
3Y92Q22339Jones, Marcas AY92Q22339Jones, Marcas A
4Y553QQ3A42MKing,TimothyRaymond Stephen KingY553QQ3A4King,Timothy
5Y553QQ3A4Y78QM786King,TimothyJenny King2MRaymond Stephen King
6Y553QQ3A4QY8398970King,TimothyChandra KingY553QQ3A4King,Timothy
7YAM844958Klien, MaisaY78QM786Jenny King
8MAA323A88Burrows, Charles EY553QQ3A4King,Timothy
95AM33QYM8Kling, Kevin WQY8398970Chandra King
1083883A5MMount, MeghanYAM844958Klien, Maisa
11Q33Y2839ATurley, BushraMAA323A88Burrows, Charles E
12MA59M9MQ5MA3QAA439Bond, Jacqueline SDavid Bond5AM33QYM8Kling, Kevin W
13239Q3YA54Parsley, Eric A83883A5MMount, Meghan
1455MM95988Campbell, JamesQ33Y2839ATurley, Bushra
1522A538Q54Wilson, Annabelle MMA59M9MQ5Bond, Jacqueline S
16MY33MAQ58M2345M89MTerry, JaneeJohn Terry, Jr.MA3QAA439David Bond
1784AMMYQMChen, Ming239Q3YA54Parsley, Eric A
182Y5459Q4AChen, Xi55MM95988Campbell, James
192Q28454YMChen, Ma22A538Q54Wilson, Annabelle M
20MYMA2A5A48YM35QMY2Compton, NimrahMuhammad ComptonMY33MAQ58Terry, Janee
21M2345M89MJohn Terry, Jr.
2284AMMYQMChen, Ming
232Y5459Q4AChen, Xi
242Q28454YMChen, Ma
25MYMA2A5A4Compton, Nimrah
268YM35QMY2Muhammad Compton
Sheet6
Cell Formulas
RangeFormula
F2:G26F2=WRAPROWS(TOCOL(CHOOSECOLS(A2:D23,1,3,2,4),1),2)
Dynamic array formulas.
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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