+ Reply to Thread
Results 1 to 4 of 4

SUMIF based on text in a 'date column'

  1. #1
    Registered User
    Join Date
    04-07-2012
    Location
    New Orleans, LA
    MS-Off Ver
    Excel 2010
    Posts
    5

    SUMIF based on text in a 'date column'

    I'm trying to add values in a different column based on the data in another column, I think I need to use a variation of =SUMIF but am not sure how to make it work.

    For example:

    A1:A20 are dates such as April 5, 2012 in one cell and April 6, 2012 and so on.

    I'm trying to find out how to add the values in another column if the 'date column' has the text of 'April' and '2012'

    Any suggestions?

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: SUMIF based on text in a 'date column'

    Try:

    =SUMPRODUCT((LEFT($A$1:$A$20,FIND(" ",$A$1:$A$20)-1)=April)*1,(RIGHT($A$1:$A$20,4)*1=2012)*1,$B$1:$B$20)

    Assuming the values you want to sum up are in $B$1:$B$20. Does it work?
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: SUMIF based on text in a 'date column'

    Or
    =SUMIFS(B1:B20,A1:A20,"April*",A1:A20,"*2012")
    or even
    =SUMIF(A1:A20,"April*2012",B1:B20)

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: SUMIF based on text in a 'date column'

    Quote Originally Posted by Cutter View Post
    Or
    =SUMIFS(B1:B20,A1:A20,"April*",A1:A20,"*2012")
    or even
    =SUMIF(A1:A20,"April*2012",B1:B20)
    ... go with Cutter's...

+ 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