+ Reply to Thread
Results 1 to 6 of 6

if cell contain a specific text then add specific number if not add another number

  1. #1
    Registered User
    Join Date
    02-16-2016
    Location
    Seoul
    MS-Off Ver
    ms2007
    Posts
    2

    if cell contain a specific text then add specific number if not add another number

    Hello, just some simple question about excel formula.
    For example if between cell B2 until H2 contain "Paid" then add 5000 to I2 if contain "Unpaid" then minus 5000.

    http://postimg.org/image/pr1ieq1ld/

    Thanks.
    Last edited by Fielt21; 02-17-2016 at 12:37 AM. Reason: more information

  2. #2
    Registered User
    Join Date
    07-15-2014
    Location
    Liverpool, England
    MS-Off Ver
    2003, 2007, 2010 (main)
    Posts
    26

    Re: if cell contain a specific text then add specific number if not add another number

    hi its not the cleanest way to do what your asking but its the simplest

    you can then hide I:P (once you have the formula copied for all rows)
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: if cell contain a specific text then add specific number if not add another number

    Try this:-

    Please Login or Register  to view this content.

  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: if cell contain a specific text then add specific number if not add another number

    Try this...

    Data Range
    B
    C
    D
    E
    F
    G
    H
    I
    1
    2
    Paid
    Paid
    Unpaid
    Paid
    Paid
    Unpaid
    Paid
    15000
    3


    This formula entered in I2:

    =SUM(COUNTIF(B2:H2,{"Paid","Unpaid"})*{5000,-5000})
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    02-16-2016
    Location
    Seoul
    MS-Off Ver
    ms2007
    Posts
    2

    Re: if cell contain a specific text then add specific number if not add another number

    Thank you for the reply guys.
    Worked perfectly fine :D

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

    Re: if cell contain a specific text then add specific number if not add another number

    You're welcome. We appreciate 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] Attribute a specific number to a specific cell if conditions are fulfilled
    By joel.mugabe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2016, 10:16 AM
  2. [SOLVED] Remove duplicate from rows from specific cell/row number to specific cell/row number
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2016, 10:38 PM
  3. Find and Isolate a specific number within a text cell.
    By srikar.reddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2015, 12:55 PM
  4. Replies: 3
    Last Post: 04-30-2015, 08:00 AM
  5. [SOLVED] how to stop Command button If specific number is entered in a specific cell range
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2013, 05:10 AM
  6. [SOLVED] If specific text is found in cell, then return a number
    By csch123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 05:07 PM
  7. Hide specific columns dependant on number in specific cell
    By ladbroke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2012, 04:46 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