Thread
:
If Cell.Value = [???] and <=[?????] Then
View Single Post
#
1
Posted to microsoft.public.excel.programming
Chip Pearson
external usenet poster
Posts: 7,247
If Cell.Value = [???] and <=[?????] Then
Adrian,
Try something like the following:
Dim Rng As Range
For Each Rng In Range("A1:A10")
If Len(Rng.Text) =3 And Len(Rng.Text) <= 5 Then
' do something
End If
Next Rng
Change A1:A10 to the appropriate range of cells.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
"Kobayashi" wrote in message
...
I have tried to search the forum but haven't been able to find anything
so please forgive me if this has been covered previously?
How can I perform an If function, in a For... loop, whereby I wish to
find all cells with a value ( and perhaps using value is wha'ts wrong?)
between three and five characters (?) in length?
Thanks once again,
Adrian
------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~ View and post usenet messages directly from
http://www.ExcelForum.com/
Reply With Quote
Chip Pearson
View Public Profile
Find all posts by Chip Pearson