View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Replacing cells that have 2-3 letters

Dim cell as Range
for each cell in
ActiveSheet.UsedRange.specialcells(xlconstants,xlT extValues)
if len(cell.Value) = 2 or len(cell.Value) = 3 then
cell.clearcontents
end if
Next

Not sure what you want to replace them with - in the above, the cell is
cleared.

--
Regards,
Tom Ogilvy

"drewd" wrote in message
...

I'am have been unable to find a way to replace cells that have 2-3
letters only.
I would greatly apperciate any help.

Thanks in advance
Drew


--
drewd
------------------------------------------------------------------------
drewd's Profile:

http://www.excelforum.com/member.php...o&userid=14749
View this thread: http://www.excelforum.com/showthread...hreadid=263697