ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replacing cells that have 2-3 letters (https://www.excelbanter.com/excel-programming/311525-replacing-cells-have-2-3-letters.html)

drewd

Replacing cells that have 2-3 letters
 

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

Thanks in advance
Dre

--
drew
-----------------------------------------------------------------------
drewd's Profile: http://www.excelforum.com/member.php...fo&userid=1474
View this thread: http://www.excelforum.com/showthread.php?threadid=26369


Tom Ogilvy

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




Myrna Larson

Replacing cells that have 2-3 letters
 
What do you want to replace with? Do you mean clear these cells? Are there
cells that have numbers with only 2 or 3 digits, or is the column all text?

On Sun, 26 Sep 2004 20:49:52 -0500, drewd
wrote:


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




All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com