ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stubborn date format and range copy (https://www.excelbanter.com/excel-programming/395950-stubborn-date-format-range-copy.html)

Mathieu

Stubborn date format and range copy
 
Hi, I would like to recreate this formula (see below) to a whole column but I
am incapable to do so. The problem come from the date format which I cannot
change with usual format. They only way I found out was to select the cell,
then copy the formula and paste it using the text importation wizard (that I
can see when I paste the date). Any other way to go throught this would be
accepted.

Thanks!

Range("M4").Select
ActiveCell.FormulaR1C1 = "09/27/2006"
Range("W4").Select
ActiveSheet.PasteSpecial Format:="Texte Unicode", Link:=False, _
DisplayAsIcon:=False
--
Mathieu

Gary Keramidas

Stubborn date format and range copy
 
you can see if this gives you any ideas

Sub test2()
Range("M4").Value = "09/27/2006"

With Range("W4")
Range("M4").Copy
..PasteSpecial xlPasteAll
End With
End Sub

--


Gary


"Mathieu" wrote in message
...
Hi, I would like to recreate this formula (see below) to a whole column but I
am incapable to do so. The problem come from the date format which I cannot
change with usual format. They only way I found out was to select the cell,
then copy the formula and paste it using the text importation wizard (that I
can see when I paste the date). Any other way to go throught this would be
accepted.

Thanks!

Range("M4").Select
ActiveCell.FormulaR1C1 = "09/27/2006"
Range("W4").Select
ActiveSheet.PasteSpecial Format:="Texte Unicode", Link:=False, _
DisplayAsIcon:=False
--
Mathieu




Mathieu

Stubborn date format and range copy
 
Hi,
It work to some extent It change the date to it's good value wich is good.
However, I want the macro to read every cell beside "M4". Each of these cell
will have a different date and I want to copy it to another cell to keep what
I was sent. Also, I am not able to find a command that will repeat the same
line (ex.; select M4, copy to N4, Select M5, copy to N5......)
--
Mathieu


"Gary Keramidas" wrote:

you can see if this gives you any ideas

Sub test2()
Range("M4").Value = "09/27/2006"

With Range("W4")
Range("M4").Copy
..PasteSpecial xlPasteAll
End With
End Sub

--


Gary


"Mathieu" wrote in message
...
Hi, I would like to recreate this formula (see below) to a whole column but I
am incapable to do so. The problem come from the date format which I cannot
change with usual format. They only way I found out was to select the cell,
then copy the formula and paste it using the text importation wizard (that I
can see when I paste the date). Any other way to go throught this would be
accepted.

Thanks!

Range("M4").Select
ActiveCell.FormulaR1C1 = "09/27/2006"
Range("W4").Select
ActiveSheet.PasteSpecial Format:="Texte Unicode", Link:=False, _
DisplayAsIcon:=False
--
Mathieu






All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com