View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default FASTER USE OF THE REPLACE() FUNCTION !!!!!

I just wanted to mention as a follow up that I'm using the Replace method of
a range rather than VB's Replace function... it will be much faster as you
don't have to loop the cells individually.

--
Rick (MVP - Excel)



"Rick Rothstein" wrote in message
...
Try it this way...

Range("B3:B65500").Replace "-", ","

--
Rick (MVP - Excel)



"jay dean" wrote in message
...
Hi -

I am using the Replace() function for a very large range. It works okay
but wait time is quite long. Is there a more elegant approach to the
below?

For Each rng In Range("B3:B65500")
If rng.Value < "" Then
rng.Value = Replace(rng.Value, "-", ",")
End If
Next rng


Any help would be appreciated! Thanks

Jay

*** Sent via Developersdex http://www.developersdex.com ***