+ Reply to Thread
Results 1 to 3 of 3

Total based on two criteria

  1. #1
    Registered User
    Join Date
    07-30-2008
    Location
    uk
    Posts
    2

    Total based on two criteria

    So Column A is a list of names,
    Column B is a list of times in hours and minutes
    Column C is a list of dates that the times occurred

    In worksheet 2 i want to return the sum of times that occurred for a person between specific dates.
    i.e all times for Joe bloggs between 01/07/08 and 08/07/08

    I have worked out a formula for the sum if the name matches for times allready would i be able to add to this to only include the particular dates(and if so how?) or do i need some other formula.

    Any help would be appreciated i am terrible at this sort of thing....
    Last edited by Ron Coderre; 07-30-2008 at 01:22 PM. Reason: Vague title

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Welcome to the forum.

    Your title has being amended. Please take 5 mins to read the forum rules below before posting again.

    Try

    =SUMPRODUCT((Sheet1!A2:A200="Joe Bloggs")*(Sheet1!C2:C200>=DATEVALUE("01/07/08"))*(Sheet1!C2:C200<=DATEVALUE("08/07/08"))*(Sheet1!B2:B200))
    Format the formula cell as
    [h]:mm
    NOTE You can't select the whole column in Sumproduct formulas.

    VBA Noob
    Last edited by VBA Noob; 07-31-2008 at 12:03 PM.
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    07-30-2008
    Location
    uk
    Posts
    2
    thank you, this was great!

+ 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