View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
macropod macropod is offline
external usenet poster
 
Posts: 329
Default STRING SUM UNTIL

Hi ancora,

Try:
Sub Test()
Dim i as Long
Dim j as Long
With ActiveSheet
For i = 1 To .UsedRange.Rows.Count
If Len(.Range("A" & i)) 7 Then
j = j + 1
.Range("B" & j).Value = .Range("A" & i).Value
End If
Next
End With
End Sub

Cheers

--
macropod
[MVP - Microsoft Word]
-------------------------

"ancora" wrote in message ups.com...
in A column i have many records as string like

(A)
one
two
three
four five
ten
ten nine
nine
....
....
....
etc

with vba i would find all the SUM string that have at least "x"
characters including spaces between the strings, for example if i
would like to find the sum string with "8" characters at least, I'll
get in column B those SUM strings like follow

(B)
one nine
two nine
ten nine

where all the found strings have 8 characters