+ Reply to Thread
Results 1 to 7 of 7

Increment Range Cell in Do Loop

  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Increment Range Cell in Do Loop

    Is there any way to step through a range of non-contiguous cells in this loop? I've been racking my brains on this one and haven't gotten the next cell to increment.

    New ideas and methods are always welcomed.


    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Increment Range Cell in Do Loop

    Can you explain what you're trying to do?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Increment Range Cell in Do Loop

    I have a Weekly Cash Sheet that is used in conjunction with Credit Charges sheets.
    My goal is to loop through the sheet, using each particular date to preface a copy/ paste operation.

    My problem is I don't understand how to increment the date when it reaches a certain condition.

    I've attached a workbook to illustrate this.

    Thanks

  4. #4
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Increment Range Cell in Do Loop

    The do loop posted is just another attempt, which is different from the Select Case in the booklet. I was experimenting with different loops.

  5. #5
    Forum Contributor
    Join Date
    09-22-2009
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Office 2003 / Office 2007
    Posts
    114

    Re: Increment Range Cell in Do Loop

    Looking at the cash sheet, it appears that it should probably always contain 7 days, and that its structure should remain the same. Based on that assumption, if I were to need to loop through something corresponding to the column that a date is on....

    Please Login or Register  to view this content.
    This would allow you to loop through. Without a more precise example, I cannot be more specific.

    Note: I used Sheet1.Range() because accountants etc are awesome at wanting to change the names of the spreadsheet or move them around, so referring to the sheet as Sheets("mysheet") or Sheets(2) is a bad idea.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Increment Range Cell in Do Loop

    Sorry, I still don't get it. What is the input, and what is the output? What is the relevance of the RECEIPT range?

    The data layout on the first two sheets should be arranged in database fashion, with separate columns for date, code, and receipts.

  7. #7
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Re: Increment Range Cell in Do Loop

    Marzuk ,

    Thanks. I'll give that a try.

    Shg,
    Sorry for the confusion.
    Originally this is a three page workbook for entering in various forms of petty cash expenditures. This is for a small cooking school in which there are many times items must be purchased in smaller quantities. The goal is to make a fourth page that will copy/paste all data form that week so I won't have to make 52, three page weekly booklets.

    There are three pages:
    Cash Receipts
    Amex for Food expenditures
    Amex for Equipment purchases
    There are two Amex cards and this is a way to check monthly statements against listed expenditures.

    I've gotten the two AMEX pages to copy and paste just fine, as you can see in the sample YEARLY TOTALS page.
    The CASH RECEIPTS is trickier for me to go through.

    The goal is to loop through each date column, prefacing it with that columns Date heading. Later on this will be copied and pasted to the YEARLY TOTALS sheet as highlighted in yellow on the YEARLY TOTALS page.

    Hope this clears it up.

    Thanks

+ 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