View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] rumkus@hotmail.com[_2_] is offline
external usenet poster
 
Posts: 60
Default manual and macro run differences

On May 7, 9:52*am, "AltaEgo" <Somewhere@NotHere wrote:
Are you trying to change the format of something already recorded as a date?
If so, find and replace is not the way to achieve the desired result. You
need to format your date field according to you preferences.

In the worksheet, refer to the Text() function. In VBA see *the Format()
function.

--
Steve

wrote in message

...



Columns("A:A").Select
Selection.Replace What:="2009", Replacement:="09", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False


When I do it manually above replacement I received good results
(Text to date conversion)
But when record and run as macro I received comical result.
I really wonder why ? Any idea why this happens ? Thank you.- Hide quoted text -


- Show quoted text -



Hi Steve, thank you for your reply.
I copy a word table into excel as text but date field doesnt't work.
So when I manually change 2009 to 09 whole column becomes proper date.
I recorded the replacement into a macro and run but the result is
different than manual replacement.
If only i managed to run some word vba codes through excel like
replacement as i have to do some other replacements after copying the
table.