+ Reply to Thread
Results 1 to 16 of 16

If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (blank).

  1. #1
    Registered User
    Join Date
    03-11-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (blank).

    I have banged my head against the wall for 3 hours now trying different functions. Mostly with SUMIF. While the cell will take the formula as a good formula, it will not calculate properly. It simply shows me the number in cell Q13.

    =SUMIF(Q12,"1",Q13:Q16)

    Also tried =SUMIF(Q12:Q12,"1",Q13:Q16)

    and (just for grins) =SUMIF(Q13:Q16,"1",Q12:Q12)

    and =SUMIF(Q13:Q16,"1",Q12)

    I didn't expect the last two to work, but I ran out of things to try.

    I tried a few iterations of COUNTIF and IF ISBLANK too.

    Any thoughts?

    Thanks.

    P....

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

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Try

    =IF(Q12=1,SUM(Q13:Q16),"")

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    try this

    =SUMIF(Q13:Q16,1,Q12:Q12)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    03-11-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    AND THE WINNER IS:........ Jonmo1.....

    Thank you both for the efforts.

    Now, can I interpret the statement to see if I understand it?
    =IF(Q12=1,SUM(Q13:Q16),"")

    If q12 contains the digit 1, sum q13-q16 else print what is between the quote marks. (in this case, nothing).

    Thanks.

    P

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

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Yep, that's pretty much it.

    Glad to help.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Can I just add that it might be something of a shame if AlKey didn't also receive some rep for his creative effort? Very aesthetic, IMO.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    I take it back! It's not correct!

    Shame.

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Bummer! Could't get from the description whether the syntax was correct in formulas provided by OP

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    I didn't even look at the OP's initial post, to be honest! Just saw your answer and liked the originality!

    Even if it wasn't quite right for this, certainly one to remember for future...

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Thank you XOR LX for the rep though.

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Haha! You shouldn't mention it publicly since your formula didn't actually work!

    The mods'll start to think I just give out rep without even thinking!

  12. #12
    Registered User
    Join Date
    03-11-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    OK Alkey, I'll give you a second chance... :-)

    I need to take the same formula and *IF* there is a sum of (Q13:Q16), round it up to the nearest dollar. (no cents).

    I know I can do this by using another row and cell references with the ROUNDUP function, but I an trying to keep the sheet as clean as I can.

    Here is a copy of the formula that worked above without the roundup. I had to change it a little (put the "0" in as the "else" for another reason)

    =IF(Q13=1,SUM(Q14:Q17),"0")

    I tried several things and never got the ROUNDUP to work.

    Thanks again for all your help.

    P

  13. #13
    Registered User
    Join Date
    03-11-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    OK Just to show you guys I don't give up that easy, I figured it out.

    =IF(Q13=1,ROUNDUP(SUM(Q14:Q17),0),"0")


    Thanks again...

    P.../NH

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

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    I always like CEILING for rounding up (floor for down)

    Try
    =IF(Q13=1,CEILING(SUM(Q14:Q17),1),"0")

  15. #15
    Registered User
    Join Date
    03-11-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    Jonmo1, Yes ceiling worked just as well. I've not heard of that function before. But then agai, I am not doing this day and day out. Thanks.

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

    Re: If cell Q12 contains the digit 1, sum cells Q13 through Q16. otherwise do nothing (bla

    You're welcome.

+ 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. Color a single digit in a mult-digit number cell
    By Phyllis in forum Excel General
    Replies: 8
    Last Post: 09-30-2022, 04:22 PM
  2. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  3. [SOLVED] How to take split a two digit cell into two separate cells.
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-25-2013, 08:55 PM
  4. Replies: 1
    Last Post: 02-02-2012, 10:42 AM
  5. Replies: 3
    Last Post: 03-30-2009, 06:30 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