+ Reply to Thread
Results 1 to 4 of 4

Repeat macro until reach empty cell

  1. #1
    Registered User
    Join Date
    11-22-2012
    Location
    london, england
    MS-Off Ver
    Excel 2003
    Posts
    9

    Repeat macro until reach empty cell

    Hi

    I would like the below macro to repeat for the next cell down, F3 then F4 until it reaches an empty cell. I am new to excel and I think a loop is what I need but I can't get it work. help will be much appreciated, thanks


    Sub PrintStuff()
    Dim vShts As Variant

    cell = Sheets(1).Range("F2")


    If Not IsNumeric(vShts) Then
    Exit Sub
    Else
    Select Case cell
    Case 1
    Sheets("Cover").PrintPreview
    Sheets("SSI").PrintPreview
    Case 2
    Sheets("Cover").PrintPreview
    Sheets("SSI2").PrintPreview
    Case 3
    Sheets("Sheet1").PrinPreview
    Sheets("Sheet2").PrinPreview
    End Select
    End If
    End Sub

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Repeat macro until reach empty cell

    I have not tested it, but try this one
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Repeat macro until reach empty cell

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Repeat macro until reach empty cell

    Or,

    Please Login or Register  to view this content.

+ Reply to Thread

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