Error Message "Formula is too long"
Well, you could only select the cells you want to process or it could stop
when it hits a blank cell
Dim sStr as String, cell as Range
for each cell in selection
if isempty(cell) then exit for
sStr = cell
sStr = Application.Substitute(sStr,"-- Modified by: ABC","")
sStr = Application.Substitute(sStr,chr(13),"")
cell.value = sStr
Next
--
Regards,
Tom Ogilvy
wrote in message
...
On Mon, 27 Sep 2004 10:29:47 -0400, "Tom Ogilvy"
wrote:
Dim sStr as String, cell as Range
for each cell in selection
sStr = cell
sStr = Application.Substitute(sStr,"-- Modified by: ABC","")
sStr = Application.Substitute(sStr,chr(13),"")
cell.value = sStr
Next
Thanks Tom, it worked gerat. One minor twist, is there a way for
the macro to detect that it is at the last record and stop?
TIA
|