+ Reply to Thread
Results 1 to 10 of 10

Unable to use a column with dates as a condition for a sumif function

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    Oxnard, ca
    MS-Off Ver
    Excel 2007
    Posts
    4

    Unable to use a column with dates as a condition for a sumif function

    Hi,

    I tried to use Conditional Sum Wizard to create a formula that I can use and drag down for an entire column. I would like one of the conditions to equal the date in each row so for each cell in the column there should be different value because each coincides to the specific date in the row. I can put in the specific date using the Conditional Wizard, but when I change it to the cell where the date is it will not accept. it. Below is the formula the Conditional Wizard gave me..

    =SUM(IF('Time Detail'!$D$2:$D$300="26-7624",IF('Time Detail'!$A$2:$A$300=DATEVALUE("6/5/2013"),'Time Detail'!$B$2:$B$300,0),0))

    I tried to put an actual cell for the datevalue criteria, however this did not work. This is the formula I tried to use.

    =SUM(IF('Time Detail'!$D$2:$D$300="26-7624",IF('Time Detail'!$A$2:$A$300=A9,'Time Detail'!$B$2:$B$300,0),0))

    Additionally, if I copy the first formula and change the date it still doesn't work. Very confused...

    Can anyone help me out with this?

    Thanks,
    Elise

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Unable to use a column with dates as a condition for a sumif function

    Can't you just reference to the cell e.g. a2 and then drag down?

    Is you date stored as text?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    02-28-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    272

    Re: Unable to use a column with dates as a condition for a sumif function

    Instead of SUM use SUMIFS, & if possible please attach a sample file
    Please consider adding a * if I helped

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Unable to use a column with dates as a condition for a sumif function

    After you type the formula (or make changes), press CTRL + SHIFT + ENTER..
    Not just Enter

    Also, you can use SUMIFS instead of the more complex array formula

    =SUMIFS('Time Detail'!$B$2:$B$300,'Time Detail'!$D$2:$D$300,"26-7624",'Time Detail'!$A$2:$A$300,A9)

    Hope that helps.

  5. #5
    Registered User
    Join Date
    07-29-2013
    Location
    Oxnard, ca
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Unable to use a column with dates as a condition for a sumif function

    TimeDetail.xlsx That's what I thought.. and no the date is formatted as date. Here is the file. I put the formula in sheet TIME, and the cell is K8.

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Unable to use a column with dates as a condition for a sumif function

    This works for me
    =SUM(IF('time detail'!$E$3:$E$22="26-7624",IF('time detail'!$B$3:$B$22=A9,'time detail'!$C$3:$C$22,0),0))
    with 6/4/2013 in A9.

    IMPORTANT
    You must enter the formula with CTRL + SHIFT + ENTER
    This is what makes the {brackets} appear around the formula
    Do not enter those brackets by hand.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Unable to use a column with dates as a condition for a sumif function

    Also this non array formula
    =SUMIFS('time detail'!$C$2:$C$300,'time detail'!$E$2:$E$300,"26-7624",'time detail'!$B$2:$B$300,A9)

  8. #8
    Registered User
    Join Date
    07-29-2013
    Location
    Oxnard, ca
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Unable to use a column with dates as a condition for a sumif function

    I tried this formula for cell k8 and I get a value of zero. The value should be 51

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Unable to use a column with dates as a condition for a sumif function

    Did you put the date 6/4/2013 in A9 ?

    Here's your file with the new formula(s) in it.
    Your original formula still in K8

    A9: 6/4/2013

    L8: =SUM(IF('time detail'!$E$3:$E$22="26-7624",IF('time detail'!$B$3:$B$22=A9,'time detail'!$C$3:$C$22,0),0))
    Entered with CTRL + SHIFT + ENTER

    M8: =SUMIFS('time detail'!$C$2:$C$300,'time detail'!$E$2:$E$300,"26-7624",'time detail'!$B$2:$B$300,A9)

    EFewool.xlsx

  10. #10
    Registered User
    Join Date
    07-29-2013
    Location
    Oxnard, ca
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Unable to use a column with dates as a condition for a sumif function

    Oh, got it! Thank you for your help! Much appreciated!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] unable to get the sumif property of the worksheet function class -> HELP!!!
    By stadjer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2012, 07:32 AM
  2. Replies: 3
    Last Post: 04-12-2010, 07:01 PM
  3. Sumif function condition cell value
    By borut_p in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2009, 03:02 PM
  4. SUMIF function with text color condition
    By MrWallyWorld in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-17-2006, 11:10 PM
  5. [SOLVED] How do I use the "SUMIF" function using dates as a condition
    By Brit. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2006, 09:40 AM

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