+ Reply to Thread
Results 1 to 2 of 2

ranges and sums of two different columns

Hybrid View

  1. #1
    Registered User
    Join Date
    04-25-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    1

    ranges and sums of two different columns

    Scenario:

    I need to determine the peak periods in which passengers are getting on to a tour bus. I have the times in which people are getting on and how many people at those specific times. I need to be able to determine the maximum number of people with in a one hour time frame for different peaks during the day (ie. am, midday, pm and night).

    - must find the range of cells for one hour time frame
    - use the same range of cells for that one hour time frame to sum the number of passengers to find which hour has the most number of passengers


    Is this possible and if so please help, I have been trying and have had no luck and have become very frustrated.


    snap.png

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: ranges and sums of two different columns

    it would be far easier to offer a sollution if you upload the sample workbook, instead of a picture, but it looks like the following may work for you...

    create a table in, say, col C, and fill it with times (0:00...01:00...02:00 etc), then use the following formula, assuming your data starts in row 1 in columns A and B, with your time range in column C, and the formula starting in D2...

    =SUMPRODUCT(($A$1:$A$13>C1)*($A$1:$A$13<C2)*($B$1:$B$13))

    let me know how this works for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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