Results 1 to 6 of 6

VBA Loop until blank cell

Threaded View

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Huddersfield, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    VBA Loop until blank cell

    The below coding works and carries on looping but i need it to stop when it reaches a blank cell in B column in Sheet1.

    Sub test()
    Do
      ActiveCell.FormulaR1C1 = "=""TTG""&Sheet1!R[1]C[2]"
      ActiveCell.Offset(1, 0).Select
    Loop
    End Sub



    I tried the below but not sure if on right track.

    Sub test()
    Range("B1").Select
    Do Until ActiveCell.Offset(, 2) = ""
            ActiveCell.FormulaR1C1 = "=""TTG""&Sheet1!R[1]C[2]"
            ActiveCell.Offset(1, 0).Select
    Loop
    End Sub
    Last edited by JBeaucaire; 10-10-2012 at 08:37 AM. Reason: Added code tags, as per forum rules. Don't forget!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1