Convert Format when Cut and Paste

ParanoidAndroid

Board Regular
Joined
Jan 24, 2011
Messages
50
Hi Excel Experts

I would appreciate your help with this

When I cut and Paste a whole range of columns - I want to be certain that they are pasted in the right format.

How do I do this?

I want to be certain that the following columns are in General Formal - A, B, C, D, F, H, I, J, K, P

Column G is in number format to 2 decimal places

Column E is in Date Format *14/03/2001

I have the following Code

Code:
Sheets("3073Temp").Range("A:U").Copy Destination:=Sheets("3073").Range("A:U")
Sheets("> 20daysTemp").Range("A:U").Copy Destination:=Sheets("> 20Days").Range("A:U")
Sheets("3104AGYTemp").Range("A:U").Copy Destination:=Sheets("3104AGY").Range("A:U")
Sheets("3056LCSTemp").Range("A:U").Copy Destination:=Sheets("3056LCS").Range("A:U")
Sheets("4042LCSTemp").Range("A:U").Copy Destination:=Sheets("4042LCS").Range("A:U")
Sheets("2037LCSTemp").Range("A:U").Copy Destination:=Sheets("2037LCS").Range("A:U")
Sheets("3104SPTemp").Range("A:U").Copy Destination:=Sheets("3104SP").Range("A:U")

Your help much appreciated...

Thanks in advance
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
1. Before pasting set columns' format: Columns("A:A").NumberFormat = "General"
2. Copy data: Sheets("4042LCSTemp").Range("A:U").Copy
3. Make special paste as values: Sheets("4042LCS").Range("A:U").PasteSpecial with Paste:=xlPasteValues.

Code:
...
Columns("A:A").NumberFormat = "General"
...
Sheets("4042LCSTemp").Range("A:U").Copy
...
Sheets("4042LCS").Range("A:U").PasteSpecial Paste:=xlPasteValues
 
Upvote 0

Forum statistics

Threads
1,224,617
Messages
6,179,914
Members
452,949
Latest member
beartooth91

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