+ Reply to Thread
Results 1 to 7 of 7

Conditional adding

  1. #1
    Registered User
    Join Date
    04-27-2016
    Location
    Nottingham, England
    MS-Off Ver
    2010
    Posts
    3

    Cool Conditional adding

    Hello everyone. First post so please be gentle. I'm a relative newb to excel and am looking how to apply a conditional addition. By that I mean it only adds the number in G2 if the text in A2 says "Yes" and ignores it if any other text e.g. "no". I need this rule to apply to multiple rows and the answer to appear at the bottom of a column...for arguments sake lets say G15.

    I hope that makes sense. I can provide the workbook or a screenshot if necessary.

    Thanks in advance.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: Conditional adding

    Try this in G15:

    =SUMIF(A2:A14,"yes",G2:G14)

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-27-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    1

    Re: Conditional adding

    Let's assume you want to add G2 to H2 if A2 is yes, and return the value of H2 as is if otherwise.
    =if(A2="Yes",G2+H2,H2)

  4. #4
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Conditional adding

    Deleted - I got it wrong
    Last edited by Kevin#; 04-27-2016 at 12:46 PM.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

  5. #5
    Registered User
    Join Date
    04-27-2016
    Location
    Nottingham, England
    MS-Off Ver
    2010
    Posts
    3

    Re: Conditional adding

    Well I replied in the wrong place and can't delete it lol
    Last edited by spelbound; 04-27-2016 at 01:05 PM.

  6. #6
    Registered User
    Join Date
    04-27-2016
    Location
    Nottingham, England
    MS-Off Ver
    2010
    Posts
    3

    Re: Conditional adding

    Quote Originally Posted by Pete_UK View Post
    Try this in G15:

    =SUMIF(A2:A14,"yes",G2:G14)

    Hope this helps.

    Pete
    That's awesome. Works exactly how I wanted. Now, instead of Yes/No drop down list I've decided to just use check boxes. I've added them and linked them to the cells they sit in, but how do I adjust the above formula to sumif the presence of a tick instead of "yes". Thanks again.

  7. #7
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Conditional adding

    Alternative to using checkboxes,
    - format the cells with font Marlett, and then enter "a" in the cell - it displays a tick ("r" and it displays an "X")
    - it makes it easier if you want to use it elsewhere as a condition or in macros

    see attached and look at the formula in columns D & E
    Attached Files Attached Files

+ 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. Adding a Conditional Insert Row
    By Darc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2014, 07:28 AM
  2. Adding conditional formatting
    By stewart1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2011, 07:36 AM
  3. Conditional Adding
    By Lift Off in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-09-2011, 06:12 PM
  4. Adding Conditional Cells
    By enlon in forum Excel General
    Replies: 2
    Last Post: 06-05-2009, 06:25 PM
  5. Conditional Adding
    By Reefaman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-14-2007, 08:03 PM
  6. Conditional adding
    By drgeiger in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2007, 12:33 PM
  7. [SOLVED] adding conditional rows
    By Deepak Varde in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-11-2006, 06:00 PM
  8. Conditional Adding/Totaling
    By JoJoBinkus in forum Excel General
    Replies: 2
    Last Post: 01-14-2005, 11:06 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