Help with transposing from Column to Row!

LostinVA

New Member
Joined
May 23, 2018
Messages
43
Hi everybody.. I'm looking for help to update the below code to transpose data from Column format to Row format. I have the below code (thanks @Yongle for your help!) that copy values in a set of column cells when a button is pressed and pastes those values onto another tab. If the user changes any of the values that were copied and pasted previously and the button is pressed again, the data is again copied but then pasted on the next row BELOW where the previous data was pasted. Currently the copied data is pasted in column format. I'm trying to transpose the data so it's pasted in row format instead of column format. Seems as though it would only take a minor tweak to the below code but I'm a complete noob and can't get it to work. I tried using 'Transpose:=True' but am getting errors.

Private Sub CommandButton1_Click()
Range("C2:C25").Copy Sheets("OtherTab").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub

Appreciate any help you can provide!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
How about
Code:
Private Sub CommandButton1_Click()
Range("C2:C25").Copy
Sheets("OtherTab").Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Transpose:=True
End Sub
 
Upvote 0
Thanks for your quick reply! It's giving me a Compile Error: Syntax error?

Private Sub CommandButton1_Click()
Range("C2:C25").Copy Sheets("OtherTab").Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Transpose:=True
End Sub
 
Upvote 0
It needs to be on two lines, as I showed ;)
 
Upvote 0
Perfect, thank you! I had no idea that would make a difference but I also am a complete noobie so not surprising.. haha

I really appreciate your help!
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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