Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rick,
Clever! I was either blind or VBA Replace() was not operating as documented. I am not blind. EagleOne "Rick Rothstein" wrote: Replace is an odd function (in my view) in that if you specify a starting position to do the replacement at, then it returns a substring starting at that position before making the substitution (see the Remarks section for the Replace function). So, to do the replace and keep the front part of the string, you will need to concatenate it back together... Position = 16 AfterReplacement = Left(StrToSearch, Position - 1) & Replace(StrToSearch, _ StrToFind, "", Position, , vbTextCompare) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Error for a replace. It replace ALL instead of selected column | Excel Programming | |||
Can I replace a ' at the beginning of a text cell using Replace | Excel Discussion (Misc queries) | |||
How to Replace multiple words to replace using excell | Excel Programming | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions |