+ Reply to Thread
Results 1 to 5 of 5

how to loop

  1. #1
    Registered User
    Join Date
    08-31-2010
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    7

    how to loop

    Dear Excel experts. I have no practical knowledge about VBA programming in Excel. The request I have is how to program a loop in Excel. What is supposed the loop do? well, I have a date (let's call initial date) in E1 cell. This E1 cell should be increased by 1 day at a time. The iteration should end when the G13 cell is lower than the G12 cell.

    Thanks to all of you that take your time to support this request. Attached is an excel file with an example of the data.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: how to loop

    Please Login or Register  to view this content.
    Using your spreadsheet data, the date will end up at 6/13/2011.
    When that happens MAX = 4.95 and AVG = 4.94739675.

  3. #3
    Registered User
    Join Date
    08-31-2010
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: how to loop

    Dear Ed, thanks for your answer. It is working perfectly. Could you please tell me if it is possible to use R1C1 references instead of numbers for the cells option? Regards!

  4. #4
    Registered User
    Join Date
    08-31-2010
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: how to loop

    Sorry what I wanted to say is if it is possible to use the A1 reference style so I can use E3 as the cell that I need to change and G13 and G12 for the cells where I need to check conditions.

  5. #5
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: how to loop

    Instead of Cells(3, 5) (which is row 3, column 5) just say Range("e3")

    Instead of Cells(13, 7) (which is row 13, column 7) just say Range("g13")

    etc.

+ 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