+ Reply to Thread
Results 1 to 7 of 7

SUMIF in a given month

  1. #1
    Registered User
    Join Date
    04-21-2006
    Posts
    26

    SUMIF in a given month

    I need to sum totals owed for a given month. I can do a SUMIF if I have separate columns for day of week, date,month, year but it is messy. I can't seem to do the same thing if the one column is formatted to Date with the same info. I know there's a simple way - maybe it has to be a certain format to work. Hope you can help.

  2. #2
    Forum Contributor vandanavai's Avatar
    Join Date
    09-04-2006
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256
    Hi

    See if this helps u.

    Assume Dates are enterd in column A (A1,A2,A3.....)
    In cells "B1","B2".... enter formula =month(A1)
    Say in cells"C1", "C2"... amount is entered.

    In cell "D1" enter following formula
    =SUMIF(B1:B3,"=4",C1:C3) , This will give total for April as 4 represents April. For May enter 5, and so on.

    Bye

  3. #3
    Registered User
    Join Date
    04-21-2006
    Posts
    26

    sumif for a given month

    I tried to follow instructions but entering the formula =MONTH(A1) gives me
    1st Jan 1900. I'm obviously not getting it. The sumif formula looked like it should work and I had tried something very similar without the 'MONTH' formula in the other cell. Have taken out the =MONTH formula and have attached an example of what I want to do. (At least I tried to upload it. Not sure if that's how you do it) Hope this helps
    Attached Files Attached Files
    Last edited by maztaz; 09-30-2007 at 03:35 AM.

  4. #4
    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
    Try


    =SUMPRODUCT(--(TEXT($B$3:$B$200,"mm/yy")="08/07")*($E$3:$E$200))

    VBA Noob
    _________________________________________


    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 !!!

  5. #5
    Registered User
    Join Date
    04-21-2006
    Posts
    26
    Thankyou for that. I've got a bit closer but it's not returning the right answers yet. Needs a bit of tweeking. I'll keep you posted . thanks again.

  6. #6
    Registered User
    Join Date
    04-21-2006
    Posts
    26

    Yes, it works!

    Tahnkyou so much. I've changed the range in the last part of the formula and it's doing the trick.

  7. #7
    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
    Good to here.

    PS. Make sure both ranges are the same

    VBA Noob

+ 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