+ Reply to Thread
Results 1 to 3 of 3

If clauses

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    Hayward CA
    MS-Off Ver
    Excel 2007
    Posts
    1

    If clauses

    It's been awhile with If clauses, but I can't seem to get this to work. What I'm basically trying to do is

    If E2+F2+G2 is greater than or = D2, then enter 0. If its less D2, then enter the difference between the sum of E2, F2 and G2, and D2.

    How should this read?

    Thanks so much for your help.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: If clauses

    Try

    =IF(E2+F2+G2>=D2,0,D2-(E2+F2+G2))

    or

    =IF(E2+F2+G2>=D2,0,E2+F2+G2-D2)

    depending on which way around you want to perform the difference calculation.
    Martin

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: If clauses

    Maybe..

    =MAX(0,D2-SUM(E2:G2))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ 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