View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default 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