+ Reply to Thread
Results 1 to 6 of 6

Loop code

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2007
    Posts
    10

    Loop code

    Hi All

    I'm after something I know will be really simple but if you could help me that would be great!

    I have a code that works well, it starts off at an invoicing sheet, then takes data from a tab in a quoting spreadsheet, then once finished, selects the next row in the invoicing sheet and the next tab in the quoting sheet

    I just want to add a loop to it that says if cell B8 says "or" stop, but it it doesn't then execute the code below

    A nice to have to be a message box to tell me how many loops it went through

    Thanks again, I'm tearing my hair out as I know that this is simple!

    Martin

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Loop code

    Martin

    Should be straightforward, can you post the code you have so far?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Loop code

    Thanks, it's below. The cell B8 which is the condition is in the Master QM file, but you start from the Quote index file

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Loop code

    Martin

    Is that code for one invoice?

  5. #5
    Registered User
    Join Date
    09-10-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Loop code

    Yes, this updates 1 line in the invoice spreadsheet, which is one tab in the quote model spreadsheet, so I'd like the macro to work through all of the lines in the invoice sheet

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Loop code

    Martin

    Where does B8 come into things?

    Also, what exactly are you looping?

    Sorry for the questions but the code is kind of hard to follow with all the jumping between workbooks.

    Actually, could you upload a sample workbook that had some sample data and sample invoice?

    Here's how you can do that:

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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