+ Reply to Thread
Results 1 to 14 of 14

Sum up cells when option selected

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2019
    Location
    Greece
    MS-Off Ver
    XP
    Posts
    6

    Sum up cells when option selected

    Hello, could someone help me with creating a formula? I'm not sure if i should use COUNTIF or some logical function.

    Column C has numbers and column D dropdown menu with a few options. I want to sum up to some other cell the numbers of column C, but only if a specific option is selected in column D.

    Example:

    COL CCOL D
    5
    New
    7
    Reused
    3
    Reused
    2
    New
    7
    Reused
    So i want to sum all the numbers in Col C only if "New" is shown in corresponding cell of Col D.


    Thanks!
    Last edited by Pepe Le Mokko; 11-07-2019 at 03:29 AM. Reason: Descriptive title added

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,455

    Re: Sum up cells when option selected

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (I did it for you as you are new here Please read forum rules AND the yellow banner

  3. #3
    Registered User
    Join Date
    11-07-2019
    Location
    Greece
    MS-Off Ver
    XP
    Posts
    6

    Re: Sum up cells when option selected

    Thank you, Pepe Le Mokko

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Sum up cells when option selected

    Try this:

    =SUMIF(D:D,"New",C:C)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    11-07-2019
    Location
    Greece
    MS-Off Ver
    XP
    Posts
    6

    Re: Sum up cells when option selected

    Hi, thanks.

    So, for example, you mean SUMIF(C1:C100,"New",D1:D100)? Because this returns "#ERROR"

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Sum up cells when option selected

    It will only return an error if:

    1. There is no match, or
    2. The numbers in the sum column are actually text.

    Attach the workbook so we can work this out.

  7. #7
    Registered User
    Join Date
    11-07-2019
    Location
    Greece
    MS-Off Ver
    XP
    Posts
    6

    Re: Sum up cells when option selected

    Unfortunately i am not allowed to, because i'm new.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Sum up cells when option selected

    Yes, you are - look at the yellow banner at the top of the page for instructions.

    You are not allowed to post links, but you aren't being asked to post a link.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,455

    Re: Sum up cells when option selected

    Perhaps you need to change the commas in ALi's formula to semi-colons ? SUMIF(C1:C100;"New";D1:D100)

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Sum up cells when option selected

    Not if the OP really is getting an #ERROR! message - when commas need changing to semi-colons, you can't even enter the formula (usually), and you get a pop-up message. The OP needs to clarify.

  11. #11
    Registered User
    Join Date
    11-07-2019
    Location
    Greece
    MS-Off Ver
    XP
    Posts
    6

    Re: Sum up cells when option selected

    Sorry about that.

    I just figured out how to post a file instead of a link.
    I also understand now that the problem is with Google, because the formula works on MS Excel, but not on Google Spreadsheets.
    Attached Files Attached Files

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Sum up cells when option selected

    In that case, you posted in the wrong forum section. I have moved the thread for you.

    I don't work with Google Sheets, so cannot help further myself - sorry.

  13. #13
    Registered User
    Join Date
    11-07-2019
    Location
    Greece
    MS-Off Ver
    XP
    Posts
    6

    Re: Sum up cells when option selected

    It works anyway, because i have the Excel sheet locally and online, so thank you very much for your help

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,605

    Re: Sum up cells when option selected

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  2. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  3. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  4. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  5. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  6. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

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