QuantBurner
New Member
- Joined
- Jan 29, 2011
- Messages
- 42
Hiya,
so I have some cell formulas that refer to a sheet where I delete everything and then raplace the data using VBA code. of course, the delete causes #REF! errors. I thought I could use:
sheet(x).usedRange.Replace What:="=", Replacement:="'@#", LookAt:=xlPart
to replace the equals sign before I delete stuff and then use another replace:
sheet(x).usedRange.Replace What:="@#", Replacement:="'=", LookAt:=xlPart
afterwards.
Excel is too smart and does nothing. If I use '@# as the replace it works but, then the replace '@# with = doesn't as the replace doen't seem to recognize the '
Any ideas as to how to get the replace to work?
I just realized that instead of deleteing, if I use clearcontents I'd be fine. But, I'd still like a workaround for the replace.
Cheers
so I have some cell formulas that refer to a sheet where I delete everything and then raplace the data using VBA code. of course, the delete causes #REF! errors. I thought I could use:
sheet(x).usedRange.Replace What:="=", Replacement:="'@#", LookAt:=xlPart
to replace the equals sign before I delete stuff and then use another replace:
sheet(x).usedRange.Replace What:="@#", Replacement:="'=", LookAt:=xlPart
afterwards.
Excel is too smart and does nothing. If I use '@# as the replace it works but, then the replace '@# with = doesn't as the replace doen't seem to recognize the '
Any ideas as to how to get the replace to work?
I just realized that instead of deleteing, if I use clearcontents I'd be fine. But, I'd still like a workaround for the replace.
Cheers