Thread: Text Conversion
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Rekas[_2_] Michael Rekas[_2_] is offline
external usenet poster
 
Posts: 12
Default Text Conversion

Hi there

I am importing data from a SQL database.

The date is in column B and appears to be in format dd-mm-yyyy but
does not have the normal date number associated with a date.

I can generate the day number which can then be formatted in date
foemat in one of the following ways:

a) Press F2 followed by Enter on each cell
b) Enter the value 1 in a cell and use Copy, Paste Special, Multiply
on the range. (Thanks to Ralph Rosenfeld for this tip.)

I cannot record or find macro code to cycle through the rows applying
the 1st option.

I have used the following macro for the 2nd option:

Range("A1").Select
Activecell.Value = 1
Selection.Copy
Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlMultiply

This works on dates beginning with 0 but any date after the 9th of the
month stays the same.

Can anybody help?

Thanks

Michael