Mapping of Data using Row & Column

ravi2628

Board Regular
Joined
Dec 20, 2017
Messages
225
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Dear Friends,

Good Evening

i want a formula for the following example.

Macro i cant use because i have restriction so please don't suggest macro.

Input:

User nameDesktop Name02-Jan-2503-Jan-2504-Jan-2505-Jan-2506-Jan-2507-Jan-2508-Jan-25
100000LT005WFO WFOWFOWFO
100000 WO WOWO
100008LT003WFHWFHWFH
100008LT010 WFOWFOWFOWFO
100011LT011 WFH
100011DT021WFOWFO WFOWFOWFO
100011 WO
100018DT021WFOWFOWFO
100018DT031 WFHWFHWFH
100018LT010 WFO
100020LT010WFHWFH
100020LT030 WFO WFOWFH
100020DT111 WFO WFO
100027LT011WFO WFO
100027DT112 WFO
100027LT010 WFOWFO
100027DT321 WFO
100027 A/L



Output: i was looking.


User Name02-Jan-2503-Jan-2504-Jan-2505-Jan-2506-Jan-2507-Jan-2508-Jan-25
100000LT005LT005LT005LT005
100008LT003LT003LT003LT010LT010LT010LT010
100011DT021DT021LT011DT021DT021DT021
100018DT021DT021DT021DT031DT031DT031LT010
100020LT010LT010LT030DT111LT030LT030DT111
100027LT011DT112DT321LT011LT010LT010


Thanks & Regards,
Ravi
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Here is a way using Power Query.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    NoNull = Table.SelectRows(Source, each ([Desktop Name] <> null)),
    Unpivot = Table.UnpivotOtherColumns(NoNull, {"User name", "Desktop Name"}, "Attribute", "Value"),
    RC = Table.RemoveColumns(Unpivot,{"Value"}),
    Pivot = Table.Pivot(RC, List.Distinct(RC[Attribute]), "Attribute", "Desktop Name"),
    OrderColumns = Table.SelectColumns(Pivot,{"User name"} & List.Skip(Table.ColumnNames(Source),2))
in
    OrderColumns

Book9
KLMNOPQR
1User name1/2/20251/3/20251/4/20251/5/20251/6/20251/7/20251/8/2025
2100000LT005LT005LT005LT005
3100008LT003LT003LT003LT010LT010LT010LT010
4100011DT021DT021LT011DT021DT021DT021
5100018DT021DT021DT021DT031DT031DT031LT010
6100020LT010LT010LT030DT111LT030LT030DT111
7100027LT011DT112DT321LT011LT010LT010
Sheet1


My results are a bit different than what you posted. But as far as I can tell, this should be the correct output.
 
Upvote 0
@ravi2628
Can you explain why you're expecting some of the cells to return blank?
 
Upvote 0
Try:
Book7
ABCDEFGHI
1User nameDesktop Name1/2/251/3/251/4/251/5/251/6/251/7/251/8/25
2100000LT005WFOWFOWFOWFO
3100000WOWOWO
4100008LT003WFHWFHWFH
5100008LT010WFOWFOWFOWFO
6100011LT011WFH
7100011DT021WFOWFOWFOWFOWFO
8100011WO
9100018DT021WFOWFOWFO
10100018DT031WFHWFHWFH
11100018LT010WFO
12100020LT010WFHWFH
13100020LT030WFOWFOWFH
14100020DT111WFOWFO
15100027LT011WFOWFO
16100027DT112WFO
17100027LT010WFOWFO
18100027DT321WFO
19100027A/L
20
211/2/251/3/251/4/251/5/251/6/251/7/251/8/25
22100000LT005LT005LT005LT005
23100008LT003LT003LT003LT010LT010LT010LT010
24100011DT021DT021LT011DT021DT021DT021
25100018DT021DT021DT021DT031DT031DT031LT010
26100020LT010LT010LT030DT111LT030LT030DT111
27100027LT011DT112DT321LT011LT010LT010
Sheet1
Cell Formulas
RangeFormula
A22:A27A22=UNIQUE(A2:A19)
B22:H27B22=TOROW(FILTER(IFS($C$2:$I$19<>"",$B$2:$B$19&""),$A$2:$A$19=A22),2,1)
Dynamic array formulas.


If you want a single array then try:
Book7
ABCDEFGH
211/2/251/3/251/4/251/5/251/6/251/7/251/8/25
22100000LT005LT005LT005LT005
23100008LT003LT003LT003LT010LT010LT010LT010
24100011DT021DT021LT011DT021DT021DT021
25100018DT021DT021DT021DT031DT031DT031LT010
26100020LT010LT010LT030DT111LT030LT030DT111
27100027LT011DT112DT321LT011LT010LT010
Sheet1
Cell Formulas
RangeFormula
A22:H27A22=LET(u,UNIQUE(A2:A19),HSTACK(u,DROP(REDUCE("",u,LAMBDA(x,y,VSTACK(x,TOROW(FILTER(IFS(C2:I19<>"",B2:B19&""),A2:A19=y),2,1)))),1)))
Dynamic array formulas.
 
Upvote 0
Try:
Book7
ABCDEFGHI
1User nameDesktop Name1/2/251/3/251/4/251/5/251/6/251/7/251/8/25
2100000LT005WFOWFOWFOWFO
3100000WOWOWO
4100008LT003WFHWFHWFH
5100008LT010WFOWFOWFOWFO
6100011LT011WFH
7100011DT021WFOWFOWFOWFOWFO
8100011WO
9100018DT021WFOWFOWFO
10100018DT031WFHWFHWFH
11100018LT010WFO
12100020LT010WFHWFH
13100020LT030WFOWFOWFH
14100020DT111WFOWFO
15100027LT011WFOWFO
16100027DT112WFO
17100027LT010WFOWFO
18100027DT321WFO
19100027A/L
20
211/2/251/3/251/4/251/5/251/6/251/7/251/8/25
22100000LT005LT005LT005LT005
23100008LT003LT003LT003LT010LT010LT010LT010
24100011DT021DT021LT011DT021DT021DT021
25100018DT021DT021DT021DT031DT031DT031LT010
26100020LT010LT010LT030DT111LT030LT030DT111
27100027LT011DT112DT321LT011LT010LT010
Sheet1
Cell Formulas
RangeFormula
A22:A27A22=UNIQUE(A2:A19)
B22:H27B22=TOROW(FILTER(IFS($C$2:$I$19<>"",$B$2:$B$19&""),$A$2:$A$19=A22),2,1)
Dynamic array formulas.


If you want a single array then try:
Book7
ABCDEFGH
211/2/251/3/251/4/251/5/251/6/251/7/251/8/25
22100000LT005LT005LT005LT005
23100008LT003LT003LT003LT010LT010LT010LT010
24100011DT021DT021LT011DT021DT021DT021
25100018DT021DT021DT021DT031DT031DT031LT010
26100020LT010LT010LT030DT111LT030LT030DT111
27100027LT011DT112DT321LT011LT010LT010
Sheet1
Cell Formulas
RangeFormula
A22:H27A22=LET(u,UNIQUE(A2:A19),HSTACK(u,DROP(REDUCE("",u,LAMBDA(x,y,VSTACK(x,TOROW(FILTER(IFS(C2:I19<>"",B2:B19&""),A2:A19=y),2,1)))),1)))
Dynamic array formulas.


Thanks Cubist thanks for logic
 
Upvote 0

Forum statistics

Threads
1,226,099
Messages
6,188,902
Members
453,509
Latest member
Stepanus lejiu

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