VISHAL120
01-17-2012, 06:16 AM
Hi,
I needed some help here concerning transposing. Till now this code has been doing a great job for me and has been very helpful :
here is the code am using actually for transposing from row to column.
Sub Transposing_modules_defined_on_planner()
Dim x As Long
Dim lastrow As Long
Application.ScreenUpdating = False
Application.EnableEvents = False
Sheets("PLANNER").Select
Range("D4:D65536").ClearContents
lastrow = Range("G65536").End(xlUp).Row
For x = 4 To lastrow
Range("G" & x & ":IV" & x).Copy
Range("D63536").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Next x
Range("D4").Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
This transposes all the loaded and define modules of the order to a column which we have already duplicated.
Just for info this is only part of the data I am giving for an idea normally this consist of more than 2000 rows.
Normally after having duplicated the orders as per the column E ( see order 1000 on attachement) I will run the code which will transpose all the modules loaded according to each order to column D which is the modules.
I just want to know if there is a possibility to transfer now the modules from the column to rows where we initially defined the modules that is on the first of each order not on the duplicate orders because many times we changes the modules on the column D when doing the planning on another file and need to have it back again for next week plan.
i have attached a sample data for example.
Many thanks for the help in advance.
I needed some help here concerning transposing. Till now this code has been doing a great job for me and has been very helpful :
here is the code am using actually for transposing from row to column.
Sub Transposing_modules_defined_on_planner()
Dim x As Long
Dim lastrow As Long
Application.ScreenUpdating = False
Application.EnableEvents = False
Sheets("PLANNER").Select
Range("D4:D65536").ClearContents
lastrow = Range("G65536").End(xlUp).Row
For x = 4 To lastrow
Range("G" & x & ":IV" & x).Copy
Range("D63536").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Next x
Range("D4").Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
This transposes all the loaded and define modules of the order to a column which we have already duplicated.
Just for info this is only part of the data I am giving for an idea normally this consist of more than 2000 rows.
Normally after having duplicated the orders as per the column E ( see order 1000 on attachement) I will run the code which will transpose all the modules loaded according to each order to column D which is the modules.
I just want to know if there is a possibility to transfer now the modules from the column to rows where we initially defined the modules that is on the first of each order not on the duplicate orders because many times we changes the modules on the column D when doing the planning on another file and need to have it back again for next week plan.
i have attached a sample data for example.
Many thanks for the help in advance.