Transpose column data to one row

bigroo

Board Regular
Joined
Jun 22, 2008
Messages
74
I am looking for a formula to do this if possible, but VBA will work if not available as a formula.

So, in column A there are dates, column G has a driver name, column L has either LF or DT two show either landfill or downtime status. Over in column R I have weights of the landfill load, but only if LF is present in column L. This data can cover 3 to 5 rows for one date and one driver. So I want to transpose the weights for each landfill trip from column R to the first row under columns S, T, U, V & W for what ever number of landfill tips there is.

I hope this makes sense!

I have tried this formula
=If(and(($G8=$G7),($L8="LF")),transpose($R8),"")

Thanks
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Describing how your data is structured is great; posting sample data of before and after would be even better.

Cheers,

tonyyy
 
Upvote 0
Thanks Tonyy for the reply!
I don't see how to post a sample, can you direct me?

Thanks
 
Upvote 0
I don't see how to post a sample, can you direct me?
Read Tony's signature block at the bottom of his post. Or mine for that matter. :)

Edit: Actually, on checking, I note that Tony's link to Excel jeanie is broken so better stick to my signature block.
 
Last edited:
Upvote 0
Thanks, so here is my sample!

Excel 2016 (Windows) 64 bit
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
5
Before
6
RCDATE
RCROUT
RCCOMP
RCSTOP
RCLIFT
RCVEHLRCDRVR
RCDAY
RCSTRT
RCARVL
RCSTPT
RCTYPE
RCLAND
RCTCKT
RCMATL
RCUOM
RCUNIT
LF Trips
LF trip 1
LF trip 2
LF trip 3
LF trip 4
LF trip 5
7
20180716​
AFRED
1​
LF
13.43​
8
20180716​
AFRED
1​
LF
8.19​
9
20180716​
AFRED
1​
DT
0​
10
20180716​
AFRED
1​
LF
0​
11
20180716​
BJOHN
1​
LF
15.25​
12
20180716​
BJOHN
1​
LF
15.55​
13
20180716​
BJOHN
1​
LF
15.25​
14
15
16
After
17
RCDATE
RCROUT
RCCOMP
RCSTOP
RCLIFT
RCVEHLRCDRVR
RCDAY
RCSTRT
RCARVL
RCSTPT
RCTYPE
RCLAND
RCTCKT
RCMATL
RCUOM
RCUNIT
LF Trips
LF trip 1
LF trip 2
LF trip 3
LF trip 4
LF trip 5
18
20180716​
AFRED
1​
LF
13.43​
13.43​
8.19​
0​
19
20180716​
AFRED
1​
LF
8.19​
20
20180716​
AFRED
1​
DT
0​
21
20180716​
AFRED
1​
LF
0​
22
20180716​
BJOHN
1​
LF
15.25​
15.25​
15.55​
15.25​
23
20180716​
BJOHN
1​
LF
15.55​
24
20180716​
BJOHN
1​
LF
15.25​
Sheet: Sheet2
 
Upvote 0
Try this, copied across and down.

Excel Workbook
AGLRSTUVW
6RCDATERCDRVRRCTYPELF TripsLF trip 1LF trip 2LF trip 3LF trip 4LF trip 5
720180716FREDLF13.4313.438.190
820180716FREDLF8.19
920180716FREDDT0
1020180716FREDLF0
1120180716JOHNLF15.2515.2515.5515.25
1220180716JOHNLF15.55
1320180716JOHNLF15.25
Transpose
 
Upvote 0

Forum statistics

Threads
1,217,371
Messages
6,136,172
Members
449,996
Latest member
duraichandra

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