+ Reply to Thread
Results 1 to 3 of 3

Macro To Loop And Insert a Page-break

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    NJ--USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro To Loop And Insert a Page-break

    I have lurked and learned but now this is beyond me-Attached is a sample file - The tab Data is where I start the macro and it is the file( after I have cleaned it up) that I get once a week-I added Column K/L-Blank Count Sheet Format is where the macro puts the info- count sheet is what I want it to look like- Old version is how I used to present the sheets-using subtotals etc-See the print preview to see what old ver and sample look like--

    This macro below starts in data and puts Column K / L on the blank and then fills them in. Field 1-5 is all one loc sequence -I have the macro going the first few steps what I have been pulling my hair out attempting to do is --If the part# stays the same keep putting the locations under each other-As I show on Count Sheet and when the part# changes put a page break in and start over again with the new part# and assorted info. The file I get each week to do this with will have from 150 to 200 part #'s. I need a page for each--Each part has from 1 to 10 location's ( The loc consists of Field1-5 alfa-numeric )

    This is what I have so far----

    Please Login or Register  to view this content.

    Any help at all would really be appreciated as I need to push one of these out per week--

    Paul
    Attached Files Attached Files
    Last edited by SgtPb; 02-03-2010 at 12:08 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Teach a Macro To Loop And Insert a Page-break

    Hello SgtPb,

    Welcome to the Forum!

    The macro below has been added to a button on the "Blank Count Sheet Format" sheet. Each complete part number listing and its locations are separated by 2 rows. The macro has been added to the attached worksheet.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-27-2010
    Location
    NJ--USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Smile Re: Teach a Macro To Loop And Insert a Page-break

    Hi Leith-

    Thank you VERY much ! Works great--Amazing that you could fix this so quick---

    Paul

+ 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