+ Reply to Thread
Results 1 to 3 of 3

For loop calculation with functions to add numbers in a table

  1. #1
    Registered User
    Join Date
    08-31-2013
    Location
    Denver,CO
    MS-Off Ver
    Excel 2010
    Posts
    9

    For loop calculation with functions to add numbers in a table

    time taken Capture.JPG

    This can be achieved by for loop/macros/VBA etc but if we can do it by functions, that would be great!

    Every hole has a time attached/allotted to it. At any given time we need to calculate the stipulated time allotted to the players until that particular hole.
    I have attached a screen shot to make it easier to comprehend.

    I need to add up the time or the pick out the total time and substract what's not needed.
    Let's say, I am on hole 7, the player started on 1 going to 9. I need 105 mts
    if the player started on 5, going to 13, on hole 10, answer wd be 90 mts (150-60)...and so on. The problem gets a wee bit complicated when we turn 18 and start again on 1.

    Presently, I am vlooking up the above numbers and substracting and its complicated, with numbers of cases and ending up using nested IF statements and its getting tedious!!
    I have start hole, end hole, status hole. I need to calculate time for 'status hole'.

    Any help?!

    ---------------------------------------------------------------------------------------------------
    Comments added from my previous post to clear some nuances of golf.

    I am starting at hole no 1. If I play 9 holes, I end at hole number 9. If I play 18-hole round, I end at hole 18.
    (so we are counting the hole that we start on..therefore 1+9=9...!)

    If I play a 9-hole scramble, I can start only on the hole that I am assigned. Therefore I could start at hole 5, I end at hole 13. If I start at hole 13, I end at hole 3.
    If I play a 18-hole scramble,I could start at hole 5, I end at hole 4. If I start at hole 13, I end at hole 12.

    For those that are not golf-savvy
    Front nine- 1 through 9 (holes)
    Back nine - 10 through 18 (9 holes)
    ..and only in a tournament, start any hole and end after playing 9 or 18, hole 1 following hole 18.
    Last edited by xsmash; 09-13-2013 at 06:17 AM.

  2. #2
    Registered User
    Join Date
    05-23-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: For loop calculation with functions to add numbers in a table

    Hi Xsmash,

    Can you provide and example and an expected result? I'm having trouble following what it is exactly that you are trying to accomplish.

  3. #3
    Registered User
    Join Date
    08-31-2013
    Location
    Denver,CO
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: For loop calculation with functions to add numbers in a table

    There is an attached graphic,pl have a look. If there was a easy way to post a table, then I would do it.
    I need a summation of the Time column, if we specify a number in the hole column(sum until, and including)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Loop Import HTML Tables, Extract 3 Cells from Table, Do Calculation on Cells
    By jhowland in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-04-2013, 01:07 AM
  2. Trying to speed up the calculation my For Loop
    By Astroboy142 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2010, 04:32 AM
  3. Calculation loop through col and rows.
    By vishal120 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2010, 11:44 AM
  4. Calculation Loop
    By ronaldk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2009, 08:20 AM
  5. [SOLVED] Loop for if then calculation
    By rwnelson in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-13-2006, 02:25 PM

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