+ Reply to Thread
Results 1 to 4 of 4

If Than

  1. #1
    Registered User
    Join Date
    02-15-2012
    Location
    homosassa
    MS-Off Ver
    Excel 2007
    Posts
    2

    If Than

    If a column is > or = to another column than subtract if < or = to than add. How do you write this formula?

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: If Than

    You mean "then"?
    Try this:
    =IF(A1>=B1,A1-B1,A1+B1)
    Quang PT

  3. #3
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: If Than

    Quote Originally Posted by bebo021999 View Post
    You mean "then"?
    Try this:
    =IF(A1>=B1,A1-B1,A1+B1)
    To bebo021999 @ :Your formula is comparing value of this cell with another cell but the purpose : "Compare value in this column with another column (Alot of cells)"
    To General 3 @ : Can you upload your file? So we can see the suggestion and the results you desire.
    Thanks!

  4. #4
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: If Than

    Quote Originally Posted by bebo021999 View Post
    You mean "then"?
    Try this:
    =IF(A1>=B1,A1-B1,A1+B1)
    To bebo021999 @ :Your formula is comparing value of this cell with another cell but the purpose : "Compare value in this column with another column (Alot of cells)"
    To General 3 @ : Can you upload your file? So we can see the suggestion and the results you desire.
    Thanks!

  5. #5
    Registered User
    Join Date
    02-15-2012
    Location
    homosassa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: If Than

    Thanks all for your help. Trying to Set up a simple inventory process. If beginning qty is 5 ending qty is 3 we'er -2. If beginning qty is 3 ending qty is 5 we'er +2. I could not achive these answers with the formulas provided.

    Thank you all for your continued efforts and hope you can come up with a answer. We are a small non profit working with foster kids. Thanks General 3

  6. #6
    Registered User
    Join Date
    01-17-2012
    Location
    London,England
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: If Than

    Quote Originally Posted by sunflowers View Post
    To bebo021999 @ :Your formula is comparing value of this cell with another cell but the purpose : "Compare value in this column with another column (Alot of cells)"
    To General 3 @ : Can you upload your file? So we can see the suggestion and the results you desire.
    Thanks!

    Hi,

    Not quite sure what you mean by value of a column, you can use the formula for a cell and copy it all the way down,
    or alternative sum up the columns in a cell and then use the formula. Either way, I think you're going to have to implement the cell formula.

    HTML Code: 
    The above is one solution which you can copy down and use,

    an alternative preference could be:


    HTML Code: 
    This reads as follows; If A2 is > A1 or A2 = A1, then A2 - A1, otherwise A2 + A1

    Because if A2 is NOT > A1 or A2 is NOT = A1, then by default A2 HAS TO BE < A1.



    Hope that helps.




    A X L

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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