ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date to Text (https://www.excelbanter.com/excel-programming/310269-date-text.html)

booshi

Date to Text
 
Please advise how to copy a column of the following date format as text
into another column.

Selection.NumberFormatLocal = "yyyy-mm"

eg Instead of 2003-0,1 4-Jan-2003 returns to 37625



Norman Jones

Date to Text
 
Hi Booshi,

Try:

Set srcRng = Range("A1:A10")
Set destRng = Range("D1")

srcRng.Copy destRng
destRng.Resize(srcRng.Count).NumberFormat = "0"

---
Regards,
Norman



"booshi" wrote in message
...
Please advise how to copy a column of the following date format as text
into another column.

Selection.NumberFormatLocal = "yyyy-mm"

eg Instead of 2003-0,1 4-Jan-2003 returns to 37625






All times are GMT +1. The time now is 08:02 PM.

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