Finding text and replacing in VBA
This doesn't make any attempt to establish validity - if it is a hard coded
text value in the range, it is replaced with zero.
Sub ReplaceText()
Dim rng as Range
On Error Resume Next
set rng = Range("B2:Z26")
rng.specialcells(xlconstants,xlTextValues).Value = 0
On Error goto 0
End Sub
--
Regards,
Tom Ogilvy
wrote in message
oups.com...
Dear All,
we have a pricing template that some turkeys decide to include text in
it when filling it out.
How can I find and replace ANY text that appears in the range? The
variance of entered text is huge, so there is no way to find and
replace specific text.
We want to replace any text with a zero ("0").
Basically, we need to go from cell to cell, find an instance of text,
then replace it with zero.
Help would be greatly appreciated...
Regards,
andym
|