Home can I get row data to column data?

HockeyDiablo

Board Regular
Joined
Apr 1, 2016
Messages
182
Home can I get row data to column data? The information can only be whats listed on the top of the instance. Each instance is separated by a blank row (10,20)

I will provide 3 instances as a reference.

htwknd.png
[/IMG]
 
Something like this?


Excel 2010
ABCDE
1Work Date:4/1/2016Total Hours:
2Work OrderCustomer nameAppointment Type
34/1/2016Aaron Thompson-Aaron ThompsonBLANK
44/1/2016Aaron Thompson120015Charles FrankNC-Remote/Keyless/Prog.
54/1/2016Aaron Thompson120015Charles FrankNC-Remote/Keyless/Prog.
64/1/2016Aaron Thompson120015Charles FrankNC-Remote/Keyless/Prog.
74/1/2016Aaron Thompson119408Tammy BauerNC-New_Door_Estimate
84/1/2016Aaron Thompson119408Tammy BauerNC-New_Door_Estimate
94/1/2016Aaron Thompson119408Tammy BauerNC-New_Door_Estimate
104/1/2016Aaron Thompson120087Robin EllingsonNC-Wont_Open/Need_to_Assist
114/1/2016Aaron Thompson120087Robin EllingsonNC-Wont_Open/Need_to_Assist
124/1/2016Aaron Thompson120087Robin EllingsonNC-Wont_Open/Need_to_Assist
134/1/2016Aaron Thompson120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
144/1/2016Aaron Thompson120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
154/1/2016Aaron Thompson120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
164/1/2016Aaron Thompson120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
174/1/2016Aaron Thompson120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
184/1/2016Aaron Thompson120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
194/1/2016Aaron Thompson120119Vance VangRC-Door/Track_Hit
204/1/2016Aaron Thompson120119Vance VangRC-Door/Track_Hit
214/1/2016Aaron Thompson120119Vance VangRC-Door/Track_Hit
224/1/2016Aaron Thompson120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
234/1/2016Aaron Thompson120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
244/1/2016Aaron Thompson120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
254/1/2016Aaron Thompson120125Mary Montury*DI-WMA
Sheet0
Cell Formulas
RangeFormula
A3=IF(AND(C3<>"-",ISNUMBER(C3)=FALSE),"",IF(D2="Customer name",D1,A2))
B3=IF(AND(C3<>"-",ISNUMBER(C3)=FALSE),"",IF(D2="Customer name",D3,B2))
 
Upvote 0
Doesnt change the Date or The customer name when they change, thanks tho, I saw where you were going with that

think this would be more of a VBA vs Formula?
 
Last edited:
Upvote 0
Note that if the dates in column D aren't interpreted by Excel as numbers, you can highlight the column, ctrl-h, replace / with /


I also think your file might be set to manual calculation (only changes when saved or F9 is pressed). Click on file-options-formulas-automatic.
 
Last edited:
Upvote 0
With your sample file I renamed the before sheet to example.

Here's the sheet before and after, with the code below.

Excel Workbook
ABC
1Work Date:4/1/2016Total Hours:
2Work OrderCustomer nameAppointment Type
3-Aaron ThompsonBLANK
4120015Charles FrankNC-Remote/Keyless/Prog.
5120015Charles FrankNC-Remote/Keyless/Prog.
6120015Charles FrankNC-Remote/Keyless/Prog.
7119408Tammy BauerNC-New_Door_Estimate
8119408Tammy BauerNC-New_Door_Estimate
9119408Tammy BauerNC-New_Door_Estimate
10120087Robin EllingsonNC-Wont_Open/Need_to_Assist
11120087Robin EllingsonNC-Wont_Open/Need_to_Assist
12120087Robin EllingsonNC-Wont_Open/Need_to_Assist
13120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
14120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
15120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
16120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
17120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
18120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
19120119Vance VangRC-Door/Track_Hit
20120119Vance VangRC-Door/Track_Hit
21120119Vance VangRC-Door/Track_Hit
22120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
23120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
24120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
25120125Mary Montury*DI-WMA
26120125Mary Montury*DI-WMA
27120125Mary Montury*DI-WMA
28-Aaron ThompsonBLANK
29120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
30120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
31
32Work Date:4/2/2016Total Hours:
33Work OrderCustomer nameAppointment Type
34-Jon DoeBLANK
35120127Tom PetersonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
36120127Tom PetersonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
37120127Tom PetersonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
38120062Jenny TreuenfelsNC-CBL_Broken/Crooked/Off_Track/Roller_Out
39120062Jenny TreuenfelsNC-CBL_Broken/Crooked/Off_Track/Roller_Out
40120062Jenny TreuenfelsNC-CBL_Broken/Crooked/Off_Track/Roller_Out
41120068William Wood*Special/Quoted_Pricing_(See_Notes)
42120068William Wood*Special/Quoted_Pricing_(See_Notes)
43120068William Wood*Special/Quoted_Pricing_(See_Notes)
44120129Bryce CarlsonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
45120129Bryce CarlsonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
46120129Bryce CarlsonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
47120121Paul CommersRC-Opener_Repair_(G&S-SS-Chain-ETC)
48120121Paul CommersRC-Opener_Repair_(G&S-SS-Chain-ETC)
49120121Paul CommersRC-Opener_Repair_(G&S-SS-Chain-ETC)
50120143Blair LarsonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
51120143Blair LarsonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
52120143Blair LarsonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
53120149Deann ChristensenNC-Door/Track_Hit
54120149Deann ChristensenNC-Door/Track_Hit
55120149Deann ChristensenNC-Door/Track_Hit
56-Jon DoeBLANK
57
58Work Date:4/4/2016Total Hours:
59Work OrderCustomer nameAppointment Type
60-Emily JeanBLANK
61120177John ChristiansenNC-Wont_Open/Need_to_Assist
62120177John ChristiansenNC-Wont_Open/Need_to_Assist
63120177John ChristiansenNC-Wont_Open/Need_to_Assist
64120154Marian Brundage*Service_WMA
65120154Marian Brundage*Service_WMA
66120154Marian Brundage*Service_WMA
67120122Allyn ZelenkaNC-Tune_up/Adjustment
68120122Allyn ZelenkaNC-Tune_up/Adjustment
69120122Allyn ZelenkaNC-Tune_up/Adjustment
70120181Calvin Hall*Service_WMA
71120181Calvin Hall*Service_WMA
72120181Calvin Hall*Service_WMA
73120194Burnsville Shop - Read Appointment Notes*Instruction/Note
74120194Burnsville Shop - Read Appointment Notes*Instruction/Note
75120194Burnsville Shop - Read Appointment Notes*Instruction/Note
76120265Dave SchaeferRC-Spring_Replacement_(SPNQ)
77120265Dave SchaeferRC-Spring_Replacement_(SPNQ)
78120265Dave SchaeferRC-Spring_Replacement_(SPNQ)
79120272Nick Larson*Special/Quoted_Pricing_(See_Notes)
80120272Nick Larson*Special/Quoted_Pricing_(See_Notes)
81120272Nick Larson*Special/Quoted_Pricing_(See_Notes)
82-Emily JeanBLANK
Example


Excel Workbook
ABCDE
1Work Date:4/1/2016Total Hours:
2Work OrderCustomer nameAppointment Type
3-Aaron ThompsonBLANK
4Aaron Thompson4/1/2016120015Charles FrankNC-Remote/Keyless/Prog.
5Aaron Thompson4/1/2016120015Charles FrankNC-Remote/Keyless/Prog.
6Aaron Thompson4/1/2016120015Charles FrankNC-Remote/Keyless/Prog.
7Aaron Thompson4/1/2016119408Tammy BauerNC-New_Door_Estimate
8Aaron Thompson4/1/2016119408Tammy BauerNC-New_Door_Estimate
9Aaron Thompson4/1/2016119408Tammy BauerNC-New_Door_Estimate
10Aaron Thompson4/1/2016120087Robin EllingsonNC-Wont_Open/Need_to_Assist
11Aaron Thompson4/1/2016120087Robin EllingsonNC-Wont_Open/Need_to_Assist
12Aaron Thompson4/1/2016120087Robin EllingsonNC-Wont_Open/Need_to_Assist
13Aaron Thompson4/1/2016120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
14Aaron Thompson4/1/2016120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
15Aaron Thompson4/1/2016120092David SwensonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
16Aaron Thompson4/1/2016120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
17Aaron Thompson4/1/2016120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
18Aaron Thompson4/1/2016120074Lourdas NehringNC-Misc/SE_Unsure_of_Issue_(See_Notes)
19Aaron Thompson4/1/2016120119Vance VangRC-Door/Track_Hit
20Aaron Thompson4/1/2016120119Vance VangRC-Door/Track_Hit
21Aaron Thompson4/1/2016120119Vance VangRC-Door/Track_Hit
22Aaron Thompson4/1/2016120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
23Aaron Thompson4/1/2016120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
24Aaron Thompson4/1/2016120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
25Aaron Thompson4/1/2016120125Mary Montury*DI-WMA
26Aaron Thompson4/1/2016120125Mary Montury*DI-WMA
27Aaron Thompson4/1/2016120125Mary Montury*DI-WMA
28Aaron Thompson4/1/2016-Aaron ThompsonBLANK
29Aaron Thompson4/1/2016120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
30Aaron Thompson4/1/2016120036Tabitha BarnesNC-Misc/SE_Unsure_of_Issue_(See_Notes)
31
32Work Date:4/2/2016Total Hours:
33Work OrderCustomer nameAppointment Type
34-Jon DoeBLANK
35Jon Doe4/2/2016120127Tom PetersonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
36Jon Doe4/2/2016120127Tom PetersonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
37Jon Doe4/2/2016120127Tom PetersonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
38Jon Doe4/2/2016120062Jenny TreuenfelsNC-CBL_Broken/Crooked/Off_Track/Roller_Out
39Jon Doe4/2/2016120062Jenny TreuenfelsNC-CBL_Broken/Crooked/Off_Track/Roller_Out
40Jon Doe4/2/2016120062Jenny TreuenfelsNC-CBL_Broken/Crooked/Off_Track/Roller_Out
41Jon Doe4/2/2016120068William Wood*Special/Quoted_Pricing_(See_Notes)
42Jon Doe4/2/2016120068William Wood*Special/Quoted_Pricing_(See_Notes)
43Jon Doe4/2/2016120068William Wood*Special/Quoted_Pricing_(See_Notes)
44Jon Doe4/2/2016120129Bryce CarlsonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
45Jon Doe4/2/2016120129Bryce CarlsonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
46Jon Doe4/2/2016120129Bryce CarlsonNC-Misc/SE_Unsure_of_Issue_(See_Notes)
47Jon Doe4/2/2016120121Paul CommersRC-Opener_Repair_(G&S-SS-Chain-ETC)
48Jon Doe4/2/2016120121Paul CommersRC-Opener_Repair_(G&S-SS-Chain-ETC)
49Jon Doe4/2/2016120121Paul CommersRC-Opener_Repair_(G&S-SS-Chain-ETC)
50Jon Doe4/2/2016120143Blair LarsonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
51Jon Doe4/2/2016120143Blair LarsonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
52Jon Doe4/2/2016120143Blair LarsonNC-Opener_Repair_(G&S_-_SS_-_Chain_-_ETC)
53Jon Doe4/2/2016120149Deann ChristensenNC-Door/Track_Hit
54Jon Doe4/2/2016120149Deann ChristensenNC-Door/Track_Hit
55Jon Doe4/2/2016120149Deann ChristensenNC-Door/Track_Hit
56Jon Doe4/2/2016-Jon DoeBLANK
57
58Work Date:4/4/2016Total Hours:
59Work OrderCustomer nameAppointment Type
60-Emily JeanBLANK
61Emily Jean4/4/2016120177John ChristiansenNC-Wont_Open/Need_to_Assist
62Emily Jean4/4/2016120177John ChristiansenNC-Wont_Open/Need_to_Assist
63Emily Jean4/4/2016120177John ChristiansenNC-Wont_Open/Need_to_Assist
64Emily Jean4/4/2016120154Marian Brundage*Service_WMA
65Emily Jean4/4/2016120154Marian Brundage*Service_WMA
66Emily Jean4/4/2016120154Marian Brundage*Service_WMA
67Emily Jean4/4/2016120122Allyn ZelenkaNC-Tune_up/Adjustment
68Emily Jean4/4/2016120122Allyn ZelenkaNC-Tune_up/Adjustment
69Emily Jean4/4/2016120122Allyn ZelenkaNC-Tune_up/Adjustment
70Emily Jean4/4/2016120181Calvin Hall*Service_WMA
71Emily Jean4/4/2016120181Calvin Hall*Service_WMA
72Emily Jean4/4/2016120181Calvin Hall*Service_WMA
73Emily Jean4/4/2016120194Burnsville Shop - Read Appointment Notes*Instruction/Note
74Emily Jean4/4/2016120194Burnsville Shop - Read Appointment Notes*Instruction/Note
75Emily Jean4/4/2016120194Burnsville Shop - Read Appointment Notes*Instruction/Note
76Emily Jean4/4/2016120265Dave SchaeferRC-Spring_Replacement_(SPNQ)
77Emily Jean4/4/2016120265Dave SchaeferRC-Spring_Replacement_(SPNQ)
78Emily Jean4/4/2016120265Dave SchaeferRC-Spring_Replacement_(SPNQ)
79Emily Jean4/4/2016120272Nick Larson*Special/Quoted_Pricing_(See_Notes)
80Emily Jean4/4/2016120272Nick Larson*Special/Quoted_Pricing_(See_Notes)
81Emily Jean4/4/2016120272Nick Larson*Special/Quoted_Pricing_(See_Notes)
82Emily Jean4/4/2016-Emily JeanBLANK
Example


Code:
Sub HockeyDiablo()
Dim rngData As Range, r As Range, myDate As Date, strName As String
Application.ScreenUpdating = False
    With Worksheets("Example")
        .Columns("A:B").Insert
        Set rngData = .Columns("E").SpecialCells(2)
        For Each r In rngData.Areas
            myDate = r(1, 0).Value
            strName = r(3, 0).Value
            r.Offset(3, -4).Resize(r.Rows.Count - 3, 1).Value = strName
            r.Offset(3, -3).Resize(r.Rows.Count - 3, 1).Value = myDate
        Next r
         .Columns("A:B").AutoFit
    End With
Application.ScreenUpdating = True
End Sub
 
Upvote 0
I was on manual, when I open excel it does that. Not sure why. Still playing around with this

=IF(C7="Work Date:",D7,A6) on auto fill worked great. Thank you for the inspiration.

Still open to a VBA
 
Last edited:
Upvote 0
There is no second loop, there's only one loop in the code.

I ran it against the sample data you posted, so if you are having an issue then the reason may be because there's some difference between the file you uploaded and the file you are trying to use it against.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,919
Members
453,767
Latest member
922aloose

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