+ Reply to Thread
Results 1 to 4 of 4

Conditional formula (subtraction)

  1. #1
    Registered User
    Join Date
    08-27-2008
    Location
    Chicagoland
    Posts
    5

    Conditional formula (subtraction)

    I am in need of a "subtraction" formula =a1-b1. The problem is I need excel to return either a whole number, when possible, if not return zero. Using the above formula excel returns a negative number. I am certain this is simple for some users but I just cannot find the correct formula to use. Lastly if the number result should increase where b1 is larger than a1 is it possible that excel can add the two?

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    there are 2 code for your needs:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-14-2006
    Posts
    24
    Dear dklein2149,
    You can use "If" for your condition.

    =if(b1>a1,b1+a1,a1-b1).

    That mean, if b1 is greater than a1, the result will b1+a1, else the result will a1-b1. So if a1=b1, it result will be "0".

    Hoping this can help you,
    YKnet

  4. #4
    Registered User
    Join Date
    08-27-2008
    Location
    Chicagoland
    Posts
    5
    Thank you, the formulas worked. they add, subtract and return zero as I need the formula to do. Thanks again.

+ 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. Changing conditional average formula to conditional sumproduct
    By chlor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2007, 11:39 AM
  2. conditional formula
    By Nightcaste in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2007, 03:00 PM
  3. Conditional formula question
    By odditie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2007, 09:47 PM
  4. Conditional Format- Blank cell with formula problem
    By Trappy in forum Excel General
    Replies: 4
    Last Post: 08-20-2007, 09:51 AM
  5. Formula in Conditional Formatting
    By windme in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-28-2006, 01:09 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