View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike NG Mike NG is offline
external usenet poster
 
Posts: 87
Default Behaviour of "Replace"

On Sat, 12 Jul 2003 at 15:56:15, J.E. McGimpsey (J.E. McGimpsey
) wrote:
Replace() isn't recursive - it will replace each pair of spaces with
a single space as it "travels" the string left to right. Once it's
replaced the two spaces in positions 4&5, it continues with position
6. Any other way lies madness... Imagine

Replace("Two Pints", " ", " ") 'one space each

if the method started at the character it replaced with, it would
get stuck in an infinite loop.

Well that would be silly thing to do wouldn't it
--
Mike