+ Reply to Thread
Results 1 to 9 of 9

SumIF not working

  1. #1
    Registered User
    Join Date
    03-18-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    SumIF not working

    hi all

    i tried sumif formula but it wont work with a dateif function e.g.

    if i type the numbers in
    107 108
    107 108
    107 108

    using sumif(A1:A3,107,B1:B3) would return 324

    however the formula i have for the 107s are
    for example
    =DATEDIF(E19,Sheet2!$A$2,"d")/365.25

    which equals to 107, but when i try to sumif like the above formula i get 0 not 324

    can someone help me?
    the format for both are numbers
    Last edited by lucky3; 03-18-2012 at 02:43 AM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: SumIF not working

    Hi lucky3,

    Welcome to the forum.

    Would it be possible for you to upload a sample file. Thanks

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: SumIF not working

    Hi lucky3,

    You are saying
    using sumif(A1:A3,107,B1:B3) would return 324
    As a check, can you check if a1:a3 has 107 only and not with decimal parts i.e., 107.xyz or 106.xyz etc...?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  4. #4
    Registered User
    Join Date
    03-18-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: SumIF not working

    thanks
    I did a quick check and yes it does have decimal parts which is why it didnt work. So im now wondering is there a way to use the first part not the decimal part for the sumif?

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: SumIF not working

    Ok . .

    Try lookin at TRUNC function which can be used in your case. Post the file if u face any issue. Thanks.


    Regards,
    DILIPandey

    <click on below star if this helps>

  6. #6
    Registered User
    Join Date
    03-18-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: SumIF not working

    Yep i got it to work :D

    instead of the TRUNC i used the ROUND function.

    Thank you very much

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: SumIF not working

    great....!!

    Round does the rounding of number and Trunc removed the decimal part... both can work in your issue.. but TRUNC would be more recommended in this case. Thanks.

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  8. #8
    Registered User
    Join Date
    03-18-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: SumIF not working

    Hi 1 more quick question

    when using sumif the criteria part doesnt change when i fill down the range. theres no $ symbols so im wondering if there is something that i can do?

    the criteria i have is a number e.g. i want it to change from 2 to 3 to 4 ...
    Thanks

    Edit: nvm i got it to work.. instead of the numbers i changed it to a cell number
    Last edited by lucky3; 03-18-2012 at 03:51 AM.

  9. #9
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: SumIF not working

    Hi lucky3,

    Yes... changing it to cell number using ROW function is what which can help here...

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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