Help: Reverse Engineer Macro


New member
Feb 26, 2014
Reaction score
Hi guys, I am trying to create a macro, that ultimately does the reverse of one written a while back.

I have created a macro that exports "Roster_Data" to "envision_Roster" in .csv style formatting. What I want to achieve is reverse engineer the macro to return the data back to a similar state.

I am trying to transpose column D into rows that correspond with dates in column c in a sheet called "OutputView" this in essence is similar if not exactly the same as the original worksheet "Roster_Data"

I have split the macro I am working on into three separate modules.

Module 1 - Initial Export of "Roster_Data" to "envision_Roster"
Module 2 - Format and output worksheet to find MAX date and MIN date and produce top rows of data
Module 3 - Analyse, Undertake Logical Tests of data, and transpose to suit (Replicate the initial "Roster_Data" view)

The data output needs to essentially do a logical test for name (both first and last) as well as date. I'm having trouble visioning this altogether so I've been starting with basic code to output basic stuff, but I still can't relate this back to my data.


Sub Transpose()
Dim a As Long
Dim b As Long
Dim i As Long
a = Sheets("envision_Roster").UsedRange.Rows.Count
b = 1
For i = 1 To a Step 17
Sheets("envision_Roster").Range("a" & i & ":a" & i + 20).Copy
Sheets("OutputView2").Range("a" & b).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
b = b + 1
Next i
End Sub