Transfer Multiple Data From Multiple Rows to one Column

gary2014

Board Regular
Joined
Mar 31, 2012
Messages
67
I want to transfer data which are in rows of a Excel File Sheet 1 (Cases Count) and 2 (Login Hours) into a new excel file column. Please help.



Case Count and Daily Time.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1MONTHLY CASES COUNT DATA
2Employee 02-Dec03-Dec04-Dec05-Dec06-Dec09-Dec10-Dec11-Dec12-Dec13-Dec16-Dec17-Dec18-Dec19-Dec20-Dec23-Dec24-Dec25-Dec26-Dec27-Dec30-Dec31-Dec
3David15293245364515202229393119171319312647352635
4Shane26322646394826232630433322191522331515222938
5Michelle32352947222438191521453525222625352626362637
6Gary22383215233239221823152628263728261529383836
7Chang36413526253426252125262931384831291832392626
8Katlin38443829273618282427293234371326152135192938
9Albert39473732293821312729323537211529262438263226
10Thomas19503635284024343031353840221732262741293229
11Anthony56533538274227373333384143291915293026323532
12Dominic29563441264430403635414446262117323229223829
Cases Count



Case Count and Daily Time.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1MONTHLY LOGIN HOURS DATA
2Employee 02-Dec03-Dec04-Dec05-Dec06-Dec09-Dec10-Dec11-Dec12-Dec13-Dec16-Dec17-Dec18-Dec19-Dec20-Dec23-Dec24-Dec25-Dec26-Dec27-Dec30-Dec31-Dec
3David7.506.366.367.357.297.357.227.097.356.367.116.366.547.506.366.427.228.006.368.007.486.36
4Shane7.527.507.507.097.227.097.096.967.098.007.098.007.507.488.008.007.096.367.506.367.508.00
5Michelle7.507.487.488.007.098.008.008.008.006.366.966.368.007.356.366.368.007.488.007.487.486.36
6Katlin7.487.356.366.368.006.366.366.366.366.368.006.366.367.226.367.486.367.356.367.357.356.36
7Albert7.358.007.508.006.367.357.507.488.007.506.367.487.357.097.487.357.507.117.357.357.227.48
8Thomas7.226.367.486.367.507.227.487.356.367.487.357.117.508.007.357.227.487.097.507.507.097.35
9Gary7.097.487.357.487.487.097.357.227.357.357.226.747.486.367.487.097.358.007.487.486.547.50
10Chang6.967.357.097.357.358.008.007.097.228.007.096.378.007.487.356.967.226.368.008.007.507.48
11Anthony8.007.228.007.228.007.486.366.007.096.368.006.007.227.357.116.837.097.486.367.506.368.00
12Dominic6.367.096.367.096.367.357.485.638.008.006.365.637.097.227.096.706.367.356.426.366.427.35
13Names sequence Changed from Sheet 1Sheet 2
Login Hours




New Consolidated Data.xlsx
ABCDE
1DateNameCases ProcessedTime Consumed
202-DecDavid157.50example
303-DecShane296.36example
404-DecMichelle326.36example
505-DecGary457.35example
606-DecChang367.29example
709-DecKatlin457.35example
810-DecAlbert157.22example
911-DecThomas207.09example
1012-DecAnthony227.35example
1113-DecDominic296.36example
12
13
14
15
16
17
18
19
20
Sheet1
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
This simple INDEX and MATCH formula achieves what you asked. You have a list of all the Dates and a list of each Name, but each Name is for only one Date. I don't know why you would do that - are you sure you've asked the right question? Also, in your exemplar the Cases Processed and Time Consumed columns have looked up the wrong Dates (e.g., Dec 13 Dominic is 8, not 6.36).


C2:
Code:
=INDEX(CasesCount!$B$3:$W$12,MATCH(Sheet1!$B2,CasesCount!$A$3:$A$12,0),MATCH($A2,CasesCount!$B$2:$W$2,0))
D2:
Code:
=INDEX(LoginHours!$B$3:$W$12,MATCH($B2,LoginHours!$A$3:$A$12,0),MATCH($A2,LoginHours!$B$2:$W$2,0))
 
Upvote 0
This can be accomplished using Power Query. Load both tables independently to PQ. Unpivot the data. Close and load them to a connection only. Perform an inner join on both the names and dates. See the Mcode below:
VBA Code:
let
    Source = Table.NestedJoin(Hours, {"Employee", "Attribute"}, Cases, {"Employee", "Attribute"}, "Cases", JoinKind.RightOuter),
    #"Expanded Cases" = Table.ExpandTableColumn(Source, "Cases", {"Value"}, {"Cases.Value"})
in
    #"Expanded Cases"
 
Upvote 0
This simple INDEX and MATCH formula achieves what you asked. You have a list of all the Dates and a list of each Name, but each Name is for only one Date. I don't know why you would do that - are you sure you've asked the right question? Also, in your exemplar the Cases Processed and Time Consumed columns have looked up the wrong Dates (e.g., Dec 13 Dominic is 8, not 6.36).


C2:
Code:
=INDEX(CasesCount!$B$3:$W$12,MATCH(Sheet1!$B2,CasesCount!$A$3:$A$12,0),MATCH($A2,CasesCount!$B$2:$W$2,0))
D2:
Code:
=INDEX(LoginHours!$B$3:$W$12,MATCH($B2,LoginHours!$A$3:$A$12,0),MATCH($A2,LoginHours!$B$2:$W$2,0))


Hello Dr Steele,

Yes, you were correct.

My apologies, I drafted the New Consolidated Data sheet incorrectly.

The correct form is as follows: I would like to the data to come into new sheet in Transpose form.

Case Count and Daily Time.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1MONTHLY CASES COUNT DATA
2Employee 02-Dec03-Dec04-Dec05-Dec06-Dec09-Dec10-Dec11-Dec12-Dec13-Dec16-Dec17-Dec18-Dec19-Dec20-Dec23-Dec24-Dec25-Dec26-Dec27-Dec30-Dec31-Dec
3David15293245364515202229393119171319312647352635
4Shane26322646394826232630433322191522331515222938
5Michelle32352947222438191521453525222625352626362637
6Gary22383215233239221823152628263728261529383836
7Chang36413526253426252125262931384831291832392626
8Katlin38443829273618282427293234371326152135192938
9Albert39473732293821312729323537211529262438263226
10Thomas19503635284024343031353840221732262741293229
11Anthony56533538274227373333384143291915293026323532
12Dominic29563441264430403635414446262117323229223829
Cases Count


Case Count and Daily Time.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1MONTHLY LOGIN HOURS DATA
2Employee 02-Dec03-Dec04-Dec05-Dec06-Dec09-Dec10-Dec11-Dec12-Dec13-Dec16-Dec17-Dec18-Dec19-Dec20-Dec23-Dec24-Dec25-Dec26-Dec27-Dec30-Dec31-Dec
3David7.506.366.367.357.297.357.227.097.356.367.116.366.547.506.366.427.228.006.368.007.486.36
4Shane7.527.507.507.097.227.097.096.967.098.007.098.007.507.488.008.007.096.367.506.367.508.00
5Michelle7.507.487.488.007.098.008.008.008.006.366.966.368.007.356.366.368.007.488.007.487.486.36
6Katlin7.487.356.366.368.006.366.366.366.366.368.006.366.367.226.367.486.367.356.367.357.356.36
7Albert7.358.007.508.006.367.357.507.488.007.506.367.487.357.097.487.357.507.117.357.357.227.48
8Thomas7.226.367.486.367.507.227.487.356.367.487.357.117.508.007.357.227.487.097.507.507.097.35
9Gary7.097.487.357.487.487.097.357.227.357.357.226.747.486.367.487.097.358.007.487.486.547.50
10Chang6.967.357.097.357.358.008.007.097.228.007.096.378.007.487.356.967.226.368.008.007.507.48
11Anthony8.007.228.007.228.007.486.366.007.096.368.006.007.227.357.116.837.097.486.367.506.368.00
12Dominic6.367.096.367.096.367.357.485.638.008.006.365.637.097.227.096.706.367.356.426.366.427.35
13Names sequence Changed from Sheet 1Sheet 2
Login Hours


New Consolidated Data.xlsx
ABCDE
1DateNameCases ProcessedTime Consumed
202-DecDavid157.50example (Transpose)
303-DecDavid296.36example (Transpose)
404-DecDavid326.36example (Transpose)
505-DecDavid457.35example (Transpose)
606-DecDavid367.29example (Transpose)
709-DecDavid457.35example (Transpose)
810-DecDavid157.22example (Transpose)
911-DecDavid207.09example (Transpose)
1012-DecDavid227.35example (Transpose)
1113-DecDavid296.36example (Transpose)
1216-DecDavid397.11example (Transpose)
1317-DecDavid316.36example (Transpose)
1418-DecDavid196.54example (Transpose)
1519-DecDavid177.50example (Transpose)
16…… till 31-Dec
1702-DecShane267.52
1803-DecShane327.50
1904-DecShane267.50
2005-DecShane467.09
2106-DecShane397.22
2209-DecShane487.09
2310-DecShane267.09
2411-DecShane236.96
2512-DecShane267.09
2613-DecShane308.00
27…… till 31-Dec
28
Sheet1
 
Upvote 0
This can be accomplished using Power Query. Load both tables independently to PQ. Unpivot the data. Close and load them to a connection only. Perform an inner join on both the names and dates. See the Mcode below:
VBA Code:
let
    Source = Table.NestedJoin(Hours, {"Employee", "Attribute"}, Cases, {"Employee", "Attribute"}, "Cases", JoinKind.RightOuter),
    #"Expanded Cases" = Table.ExpandTableColumn(Source, "Cases", {"Value"}, {"Cases.Value"})
in
    #"Expanded Cases"

Hello Alansidman,

My apologies, I drafted the New Consolidated Data sheet incorrectly.

The correct form is as follows: I would like to the data to come into new sheet in Transpose form.

Case Count and Daily Time.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1MONTHLY CASES COUNT DATA
2Employee 02-Dec03-Dec04-Dec05-Dec06-Dec09-Dec10-Dec11-Dec12-Dec13-Dec16-Dec17-Dec18-Dec19-Dec20-Dec23-Dec24-Dec25-Dec26-Dec27-Dec30-Dec31-Dec
3David15293245364515202229393119171319312647352635
4Shane26322646394826232630433322191522331515222938
5Michelle32352947222438191521453525222625352626362637
6Gary22383215233239221823152628263728261529383836
7Chang36413526253426252125262931384831291832392626
8Katlin38443829273618282427293234371326152135192938
9Albert39473732293821312729323537211529262438263226
10Thomas19503635284024343031353840221732262741293229
11Anthony56533538274227373333384143291915293026323532
12Dominic29563441264430403635414446262117323229223829
Cases Count


Case Count and Daily Time.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1MONTHLY LOGIN HOURS DATA
2Employee 02-Dec03-Dec04-Dec05-Dec06-Dec09-Dec10-Dec11-Dec12-Dec13-Dec16-Dec17-Dec18-Dec19-Dec20-Dec23-Dec24-Dec25-Dec26-Dec27-Dec30-Dec31-Dec
3David7.506.366.367.357.297.357.227.097.356.367.116.366.547.506.366.427.228.006.368.007.486.36
4Shane7.527.507.507.097.227.097.096.967.098.007.098.007.507.488.008.007.096.367.506.367.508.00
5Michelle7.507.487.488.007.098.008.008.008.006.366.966.368.007.356.366.368.007.488.007.487.486.36
6Katlin7.487.356.366.368.006.366.366.366.366.368.006.366.367.226.367.486.367.356.367.357.356.36
7Albert7.358.007.508.006.367.357.507.488.007.506.367.487.357.097.487.357.507.117.357.357.227.48
8Thomas7.226.367.486.367.507.227.487.356.367.487.357.117.508.007.357.227.487.097.507.507.097.35
9Gary7.097.487.357.487.487.097.357.227.357.357.226.747.486.367.487.097.358.007.487.486.547.50
10Chang6.967.357.097.357.358.008.007.097.228.007.096.378.007.487.356.967.226.368.008.007.507.48
11Anthony8.007.228.007.228.007.486.366.007.096.368.006.007.227.357.116.837.097.486.367.506.368.00
12Dominic6.367.096.367.096.367.357.485.638.008.006.365.637.097.227.096.706.367.356.426.366.427.35
13Names sequence Changed from Sheet 1Sheet 2
Login Hours


New Consolidated Data.xlsx
ABCDE
1DateNameCases ProcessedTime Consumed
202-DecDavid157.50example (Transpose)
303-DecDavid296.36example (Transpose)
404-DecDavid326.36example (Transpose)
505-DecDavid457.35example (Transpose)
606-DecDavid367.29example (Transpose)
709-DecDavid457.35example (Transpose)
810-DecDavid157.22example (Transpose)
911-DecDavid207.09example (Transpose)
1012-DecDavid227.35example (Transpose)
1113-DecDavid296.36example (Transpose)
1216-DecDavid397.11example (Transpose)
1317-DecDavid316.36example (Transpose)
1418-DecDavid196.54example (Transpose)
1519-DecDavid177.50example (Transpose)
16…… till 31-Dec
1702-DecShane267.52
1803-DecShane327.50
1904-DecShane267.50
2005-DecShane467.09
2106-DecShane397.22
2209-DecShane487.09
2310-DecShane267.09
2411-DecShane236.96
2512-DecShane267.09
2613-DecShane308.00
27…… till 31-Dec
28
Sheet1
 
Upvote 0
Take the results supplied and then filter them on the Name first and the date second. Should provide you with the expected results.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,213
Members
453,024
Latest member
Wingit77

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