+ Reply to Thread
Results 1 to 5 of 5

Issue with FIND/REPLACE Excel 2003 VBA

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    Plymouth, UK
    MS-Off Ver
    Excel 2010
    Posts
    26

    Question Issue with FIND/REPLACE Excel 2003 VBA

    Hi All,

    I have a report with lots of time data, format [hh]:mm:ss using Excel 2010 at home but use 2003 at work.

    I would like to replace 00:00:00 with "" (blank), so used the macro recorder and performed the steps manually which worked fine.

    The problem is I have tried to make it generic, and it seems to run the macro but does not replace the values. I was wondering if someone could spot something I'm missing. I can mock up a demo sheet as the original contains confidential data, but was hoping it was a code/logic error. The code is below:

    Please Login or Register  to view this content.
    Any help would be greatly appreciated.

    Thank you

    Pete Austin

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Issue with FIND/REPLACE Excel 2003 VBA

    Pete

    That code could be looking for the string "00:00:00" rather than the numeric time value 00:00:00.

    Also, it will be running on the active sheet as you have no worksheet reference.

    Or it could be neither causing the problem.

    Perhaps attaching a sample workbook would be a good idea.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-04-2012
    Location
    Plymouth, UK
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Issue with FIND/REPLACE Excel 2003 VBA

    I think you're spot on with the first part - in which case why does manually using find/replace work and how can I tell vba to look for the time value?

    Thanks very much

    Pete Austin

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Issue with FIND/REPLACE Excel 2003 VBA

    Maybe this

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Registered User
    Join Date
    09-04-2012
    Location
    Plymouth, UK
    MS-Off Ver
    Excel 2010
    Posts
    26

    Cool Re: Issue with FIND/REPLACE Excel 2003 VBA

    Much obliged my friends - spot on.

    Thanks again

    Pete Austin
    Last edited by dawatcher; 03-17-2013 at 06:46 PM. Reason: Solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1