Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text To Date Conversion | New Users to Excel | |||
Date to text conversion | Excel Discussion (Misc queries) | |||
Rotated text conversion | Excel Discussion (Misc queries) | |||
Text to time conversion | Excel Discussion (Misc queries) | |||
Value to text words conversion | Excel Worksheet Functions |