HowTo Count number of replacements
I guess you were counting amperands so
msgbox application.Countif(cells,"*&*")
however, it will only count the number of cells with ampersands. If there
are multiple ampersands in a single cell, they will only count as 1.
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
msgbox application.Countif(cells,"*,*")
--
Regards,
Tom Ogilvy
"Keith Harris" wrote in message
...
Hi,
I have a simple macro which will replace one character with another:
ActiveSheet.Cells.Replace "&", "&", xlPart, xlByRows, True
Does anyone know how to return the number of replacements other than
iterating through each cell and counting -- which I imagine would be
very
slow.
Thanks for any help.
-Keith
|