Paste special

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,362
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Is there a paste special property for the pasted text to be only a date, without formatting, such as background etc.

I have:

Code:
With Worksheets(Combo).Cells(Lastrow, 1)
        .PasteSpecial Paste:=xlPasteValues
        .PasteSpecial Paste:=xlPasteFormats
    End With

but it copies formatting and if I remove the last line, it writes a strange number that is nothing like a date. I don't want it to copy the formatting though. Is there a way to do this?
 
Thanks. One more thing, I have just been told that the reporting month goes from between the 26th of the previous month to the 25th of the current month. I am not sure what to do to differentiate what month the costing must go in.

The way I have it, it selects the month based on the month of the date. I am not sure how to get it to identify the correct month using this though. Would you be able to help please?
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I am sure you have already asked this in another thread. Please don't duplicate questions.

As for the Cells you do realise that the syntax for the column takes either the column letter or the column number so you could do
Code:
    With Worksheets(Combo).Cells(Lastrow, "J")
        .PasteSpecial Paste:=xlPasteValues
        .NumberFormat = "$#,##0.00;[Red]$#,##0.00"
    End With
if that is easier for you.

Going to get some sleep now.
 
Upvote 0
Well thank you and sorry if I doubled up on questions. I haven't got a good memory and I forget things easily.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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