+ Reply to Thread
Results 1 to 4 of 4

SUM of Hours in Month

Hybrid View

  1. #1
    Registered User
    Join Date
    05-29-2008
    Posts
    3

    SUM of Hours in Month

    Ok, Post 2,

    I am trying to get the SUM of a col for a Month

    The sheet looks a bit like this:

    ____A_______B______C
    1__Date____Hours___Feb
    2__1 Jan_____1
    3__2 Jan_____1
    4__1 Feb_____2
    5__2 Feb_____3
    6__2 Mar_____1
    7__3 Mar_____2

    the Function i'm trying to get working is:
    =SUM(LOOKUP(MONTH(C1),MONTH(A:A),B:B))

    To my mind this should return a value of 5,
    But all i get is: #NUM!



    Please help!
    Last edited by roland_c_w; 05-30-2008 at 03:53 PM. Reason: Can't get the table to look right

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =Sumproduct((Month(A1:A10)=Month(C1)),B1:B10)

    The range A1:A10 and C1 must have an actual date in them...

    Unless you are using Excel 2007, you cannot have whole column references with this formula....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-29-2008
    Posts
    3
    Thanks,

    Definatly an improvement, i now get 0 as a return,

    Any more ideas??

    I'm using 2003,

    this is fast!!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =Sumproduct(--(Month(A1:A10)=Month(C1)),B1:B10)

+ 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