+ Reply to Thread
Results 1 to 6 of 6

Total values from date range table

  1. #1
    Registered User
    Join Date
    11-20-2008
    Location
    Washington
    Posts
    16

    Total values from date range table

    I don't know where to start with this one.

    I need to put a Start and End date range in the bottom fields so it will total the values that fall within that date range.

    PHP Code: 
        October    November    December
    1    1.5    0.0    0.0
    2    2.7    0.0    2.0
    3    0.0    0.0    2.0
    4    0.0    3.4    1.8
    5    0.0    3.6    0.0
    6    3.5    1.8    0.0
    7    7.0    1.5    0.0
    8    3.9    0.0    0.0
    9    3.6    0.0    0.0
    10    2.0    0.0    1.0
    11    0.0    0.0    1.6
    12    0.0    0.0    0.0
    13    0.0    0.0    0.0
    14    3.9    1.5    0.0
    15    1.3    0.0    0.0
    16    3.8    0.0    0.0
    17    2.0    0.0    0.0
    18    0.0    0.0    0.0
    19    0.0    0.0    0.0
    20    3.8    0.0    0.0
    21    1.8    0.0    0.0
    22    1.5    0.0    0.0
    23    0.0    0.0    0.0
    24    2.0    0.0    0.0
    25    0.0    1.7    0.0
    26    0.0    0.0    0.0
    27    2.3    0.0    0.0
    28    3.3    0.0    0.0
    29    0.0    0.0    0.0
    30    0.0    0.0    1.2
    31    0.0        0.0
    Total Hours    49.9    13.5    9.6
    Start Date    1
    -Oct-08                 7-Nov-08    1-Dec-08
    End Date     6
    -Nov-08     30-Nov-08    29-Dec-09
              Total Here            Total Here            Total Here 
    As you can see with the Oct-Nov range, they can overlap months, so simply summing the column of the appropriate month won't work.

    Sorry for the formatting of this post, not much time at work to submit properly.

    Thanks for the help.
    Last edited by MrFoxar; 08-10-2009 at 01:43 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Total values from date range table

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    In short we can guess the references but it would be easier if you posted a file I think...


    I think what you're trying to do will prove pretty inefficient using native formulae - a UDF may be preferable - are you able to utilise VBA ?

  3. #3
    Registered User
    Join Date
    11-20-2008
    Location
    Washington
    Posts
    16

    Re: Total values from date range table

    I can do it in VBA, yes, but I've managed to keep the project free of vba to this point.

    I'll just take a little more time later to post the example as you've suggested.

  4. #4
    Registered User
    Join Date
    11-20-2008
    Location
    Washington
    Posts
    16

    Re: Total values from date range table

    The value shown in the bottom highlighted cells needs to reflect the sum total of hours reflected in the date range indicated in the Date Start,Date End rows.
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Total values from date range table

    one cheat - VBA less way of doing this without things becoming too horrendous...

    Please Login or Register  to view this content.
    this creates a date value for each value in your matrix allowing you to use a standard SUMIF which is pretty efficient, eg:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-20-2008
    Location
    Washington
    Posts
    16

    Re: Total values from date range table

    It'll work, thanks!

    I'll just hide the date value table.

    thanks again.

+ 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