![]() |
transpose values
hello! how do you transpose values example from C32:C44 of sheet1 to C3:O3 of
sheet2 using a macro? i need to copy the values from selected columns(interval of 5, ex. Column C,H,R,W and so on) then transfer them into rows of sheet 2? |
transpose values
Try this macro:
Sub trpose5() Sheets("sourcesheet").Select destrow = 2 For coltocopy = 3 To 18 Step 5 'change 18 to No of really last column destrow = destrow + 1 Range(Cells(32, coltocopy), Cells(44, coltocopy)).Select Selection.Copy Sheets("destsheet").Select Cells(destrow, 3).Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("sourcesheet").Select Next coltocopy End Sub Regards, Stefi €˛louie€¯ ezt Ć*rta: hello! how do you transpose values example from C32:C44 of sheet1 to C3:O3 of sheet2 using a macro? i need to copy the values from selected columns(interval of 5, ex. Column C,H,R,W and so on) then transfer them into rows of sheet 2? |
transpose values
Hi Stefi,
Thank you so much! Can this be done programmatically? I also need to transfer the names ex. B5 of sheet1= tom then paste it to A1 of sheet 2. And I need to get data from multiple worksheets then transpose them into sheet2. Example for A1:A10 data from sheet 1, A11 to A20 data from sheet 3 and so on. A B C 1 tom 2 4 2 bri 3 1 11 blue 1 0 12 red 2 1 Regards, Louie "Stefi" wrote: Try this macro: Sub trpose5() Sheets("sourcesheet").Select destrow = 2 For coltocopy = 3 To 18 Step 5 'change 18 to No of really last column destrow = destrow + 1 Range(Cells(32, coltocopy), Cells(44, coltocopy)).Select Selection.Copy Sheets("destsheet").Select Cells(destrow, 3).Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Sheets("sourcesheet").Select Next coltocopy End Sub Regards, Stefi €˛louie€¯ ezt Ć*rta: hello! how do you transpose values example from C32:C44 of sheet1 to C3:O3 of sheet2 using a macro? i need to copy the values from selected columns(interval of 5, ex. Column C,H,R,W and so on) then transfer them into rows of sheet 2? |
All times are GMT +1. The time now is 02:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com