ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Question (https://www.excelbanter.com/excel-programming/273932-re-date-question.html)

Don Guillett[_4_]

Date Question
 
posted in misc


--
Don Guillett
SalesAid Software
Granite Shoals, TX

"onliner" wrote in message
news:xPNYa.40496$Ne.17248@fed1read03...
I have downloaded data which contains a column of review dates. The dates
are formatted as mm/dd/yyyy.
I have code that expects the date to always be 8 digits (and apparently
text) in the form of, "05152004".
The current code treats the month segment as
=If(Left(A1,2)="05", Then do something...
which currently fails for months 1 thru 9.
I know I could do; =If(Month(A1)=5, etc. but this would involve finding

and
replacing every instance of the existing date-handling code. I was hoping
that I could perform a one-time vba procedure on the date column that
stepped thru each cell in the column and converted the existing date to an
8-digit text string such as 05152003 and have this "non-date" be stored as
the value in each cell.
Is there a way to do this?
Thanks,
Bud






All times are GMT +1. The time now is 10:59 PM.

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