Transpose data - keep original formatting

LostinVA

New Member
Joined
May 23, 2018
Messages
43
Hi all -

I've got the below code to copy column data when a Command Button is pressed and paste/transpose on a different tab. Each time the button is pressed, the data is pasted on the next subsequent row.

Is there a way to paste/transpose the data but keep the original cell formatting where the data is being pasted? For example, I have a 'Country' drop-down box. When the data is pasted/transposed, it 'wipes' out the drop-down box.. Is there a way to paste/transpose but keep the drop-down box?

Private Sub CommandButton1_Click()
Range("B6:B41").Copy
Sheets("QRR Template").Range("B" & Rows.Count).End(xlUp).Offset(1).PasteSpecial Transpose:=True
End Sub

Appreciate any help!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If you are pasting values try:
Code:
With Sheets("QRR Template").Range("B" & Rows.Count).End(xlUp).Offset(1)
    .PasteSpecial xlPasteFormats, Transpose:=True
    .PasteSpecial xlPasteValues, Transpose:=True
End With
If you are pasting formulas change xlPasteValues to xlPasteFormulas
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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