Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have basic VBA knowledge and am trying to solve the following problem In Excel 2003: I receive a database with a date column containing data gathered from 2 databases. The date is formatted in two different ways: '15/07/2005 15.07.2005 I would like to change all dates formatted as character to "real" dates which is the second option above (European format with dots). I have tried recording the following: ' In Date column, replace / with . Columns("A:A").Select Selection.Replace What:="/", Replacement:="." ' Change date text to number Range("N1").Select ActiveCell.FormulaR1C1 = "1" Selection.Copy Columns("A:A").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _ SkipBlanks:=False, Transpose:=False Application.CutCopyMode = False It works manually but not when replayed as a macro. The dates (even those that were originally) correct turn into characters ... if I use Edit / Clear / Formats none of the dates revert to numbers. I really appreciate your help! Thanks very much. KDJ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reformatting | Excel Discussion (Misc queries) | |||
Dates Incorrect in Chart | Charts and Charting in Excel | |||
reformatting dates | Excel Discussion (Misc queries) | |||
Reformatting dates for sorting | Excel Discussion (Misc queries) | |||
Reformatting dates as text | Excel Worksheet Functions |