View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Looping Question

Sub test()
Dim iLastRow As Long
Dim sFormula As String

sFormula = "=MID(H6,FIND("","",H6,FIND("","",H6)+1)+1,3)"
iLastRow = Cells(Rows.Count, "H").End(xlUp).Row
With Range("G6")
.Formula = sFormula
.AutoFill .Resize(iLastRow - 5)
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"MWS" wrote in message
...
Hello, I'm having difficulty writing a macro to enter the following

formula
in cell G6:

=MID(H6,FIND(",",H6,FIND(",",H6)+1)+1,3)

and continue to add the same formula in subsequent rows of column G, until
there is no longer any values in column H.

Any and All Help Is Appreciated - Thank You