Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim cell as Range
Dim rng as Range for each cell in Range("A1:B5") if len(cell.Value) = 3 and len(cell.Value)<= 5 then msgbox cell.Address & " has a length of " & len(cell.Value) if rng is nothing then set rng = cell else set rng = Union(rng,cell) End if end if Next if not rng is nothing then msgbox "found cells: " & rng.Address(0,0) End if -- Regards, Tom Ogilvy 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/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Worksheet Functions | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) | |||
Question: Cell formula or macro to write result of one cell to another cell | Excel Programming |