+ Reply to Thread
Results 1 to 4 of 4

Formula: If a cell has "text", add the value from an adjacent cell to the total

Hybrid View

  1. #1
    Registered User
    Join Date
    05-16-2016
    Location
    London
    MS-Off Ver
    Excel for Mac 15.21.1
    Posts
    13

    Formula: If a cell has "text", add the value from an adjacent cell to the total

    Hi all,
    I am trying to set up a formula that adds a number to a total if the cell alongside it has some specific free text.

    Value Text
    10 No
    14 Yes
    16 Yes
    20 No

    Total: 30

    I am trying to get the total to be automatically calculated if the text is "yes". If it says anything else, don't add the adjacent number to the total.

    How could I achieve this with a formula?

    Thanks in advance!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula: If a cell has "text", add the value from an adjacent cell to the total

    Try this...

    =SUMIF(B2:B5,"Yes",A2:A5)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-16-2016
    Location
    London
    MS-Off Ver
    Excel for Mac 15.21.1
    Posts
    13

    Re: Formula: If a cell has "text", add the value from an adjacent cell to the total

    Result! Thanks

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula: If a cell has "text", add the value from an adjacent cell to the total

    You're welcome. Thanks for the feedback!

+ 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] If total cell equals 0 add the text "N/A"
    By Laurent53 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-23-2015, 11:11 AM
  2. Replies: 8
    Last Post: 01-31-2014, 03:20 PM
  3. Find "TEXT 1" in a range and enter "TEXT 2" in the adjacent cell
    By madreag in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-28-2013, 05:34 PM
  4. Set value of cell if text in adjacent cell is "Bold"
    By cajunlibra in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-20-2012, 01:12 AM
  5. [SOLVED] Macro to delete entire row if cell contains the word "total" or "Total"
    By theatricalveggie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2011, 12:38 PM
  6. Find all cells with "A" and add the values of the adjacent cell to give a total.
    By leefarrell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2006, 11:09 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