+ Reply to Thread
Results 1 to 4 of 4

Loop issue

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    300

    Loop issue

    Thank you in advance for your time,

    I need the code below to loop:

    Sheets("Royalty Worksheet").Select
    ActiveCell.FormulaR1C1 = "=sales!R[-11]C[2]"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    What I am looking to do is pull the Site column number (starting at C11) on the sales tab and have it populate cell A22 on the Royalty Worksheet tab. Various vlookups are based off the newly populated cell. At that point I'd want the sheet to print.

    Once the sheet has printed I'd want to pull the next number in the column in the Site column (C12) and it continue as long as there are numbers in the column.

    I have tried various loops and I can't get it to work. Any help would be great.

    Thanks,

    Eddie
    Attached Files Attached Files
    Last edited by punter; 03-03-2011 at 10:43 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Loop issue

    Hi Punter
    Have a look at the attached as a starter.
    Not fully fashioned but should get you going.
    barry
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    300

    Re: Loop issue

    Thank you so very much. This is almost 100% of what I need!!!

    Only one minor issue: The printer box is coming up each time so I have to manually press print. Do you know what the command would be so it just printed and then moved on to the next store? Currently it moves on to the next store if I manually hit print but would love the macro to do that part also.

    Thank you so very much.

    Eddie

  4. #4
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Loop issue

    Hi Eddie
    Glad this is taking you forward.
    I have modified the macro slightly to give continuous printing without the dialog.
    You may wish to encompass this and other printing parameters within a self-designed userform.
    Hope this helps
    barry
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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