PDA

View Full Version : Solved: If ... then find next cell where Len() < 2



dani9
08-08-2011, 05:34 AM
as the title already says, i need macro to find next cell in column where len()<2.. maybe something with loop or another if or something.. anyrhing that works :)

this is what i have:
If Len(rngCell.Value) > 0 And _
rngCell.Value <> rngCell.Offset(1, 0).Value Then

' go to next cell where len(rngCell.value)<2
?????????

End If

any help appreciated!

Bob Phillips
08-08-2011, 05:55 AM
i = 0
Do While Len(rngCell.Offset(i, 0).Value2) >= 2

i = i + 1
Loop

Set rngCell = rngCell.Offset(i, 0)

dani9
08-08-2011, 06:20 AM
thanks a lot! works great!