Clear Empty Strings
Dim rng as Range
Dim cell as Range
On Error Resume Next
set rng = Cells.SpecialCells(xlConstants,xlTextValues)
On Error goto 0
if not rng is nothing then
for each cell in rng
if cell.Value = "" then
cell.ClearContents
end if
Next
End if
set rng = Nothing
On Error Resume Next
set rng = Cells.specialCells(xlformulas,xlTextValues)
On Error goto 0
if not rng is nothing then
for each cell in rng
if cell.value = "" thenh
cell.ClearContents
end if
Next
End if
--
Regards,
Tom Ogilvy
Tim Tabor wrote in message
...
"Tom Ogilvy" wrote in message
...
select the cells, then do
Edit=Clear and select contents or all
Thanks Tom. Couple of things. First, I'm looking for a programmatic
solution. And second, I'm only looking to clear cells whose contents are
empty strings.
|