+ Reply to Thread
Results 1 to 2 of 2

Thread: Slow Function

  1. #1
    Nigel Bennett
    Guest

    Slow Function

    I am using a search and replace in a function to change a
    text 0 to a numeric 0 but it seems to be running to long,
    here is the code

    ActiveSheet.Cells.Select
    Selection.Replace What:="0", Replacement:="0",
    LookAt:=xlPart, _
    SearchOrder:=xlByColumns, MatchCase:=False,
    SearchFormat:=False, _
    ReplaceFormat:=False

    Is there anything more efficient than this

    Thanks

    Nige

  2. #2
    Tom Ogilvy
    Guest

    Re: Slow Function

    Application.Calculation = xlManual
    ActiveSheet.Cells.SpecialCells(xlConstants,xlTextValues).Select
    Selection.Replace What:="0", Replacement:="0",
    LookAt:=xlPart, _
    SearchOrder:=xlByColumns, MatchCase:=False,
    SearchFormat:=False, _
    ReplaceFormat:=False

    Application.Calculation = xlAutomatic

    --
    Regards,
    Tom Ogilvy

    "Nigel Bennett" <nigelben@yahoo.com> wrote in message
    news:11e601c55350$8148ad00$a401280a@phx.gbl...
    > I am using a search and replace in a function to change a
    > text 0 to a numeric 0 but it seems to be running to long,
    > here is the code
    >
    > ActiveSheet.Cells.Select
    > Selection.Replace What:="0", Replacement:="0",
    > LookAt:=xlPart, _
    > SearchOrder:=xlByColumns, MatchCase:=False,
    > SearchFormat:=False, _
    > ReplaceFormat:=False
    >
    > Is there anything more efficient than this
    >
    > Thanks
    >
    > Nige




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.2.0