+ Reply to Thread
Results 1 to 9 of 9

Calculate the difference between two sheets, if no difference or < than equal 0

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Olymipc Valley, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Calculate the difference between two sheets, if no difference or < than equal 0

    Example.xlsxHello, I am trying to come up a formula (that I would think is simple, but having a hard time figuring it out).

    I want to calculate the difference between two cells, on separate sheets, only if the second number is great than the first number.
    See attached.
    Thank you!
    Last edited by bhager; 11-06-2013 at 07:31 PM.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Differences

    =IF(A1>Sheet1!A1,A1-Sheet1!A1,0)
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    Olymipc Valley, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Differences

    I couldn't seem to get that one to work.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Calculate the difference between two sheets, if no difference or < than equal 0

    Maybe your example is missing data?

    Which value are you subtracting from which? Are you using dates? Times?

    It seemed to work fine for me.

    need more infos.xlsx

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Calculate the difference between two sheets, if no difference or < than equal 0

    Perhaps 1 of these?
    =IF(B4>Sheet1!B4,B4-Sheet1!B4,"")
    or
    =MAX(B4-Sheet1!B4,0)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Calculate the difference between two sheets, if no difference or < than equal 0

    Using MAX to truncate subtractions? Genius.

    Give that man a Klondike Bar.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Calculate the difference between two sheets, if no difference or < than equal 0

    LOL thanks, daffodil

  8. #8
    Registered User
    Join Date
    01-10-2013
    Location
    Olymipc Valley, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Calculate the difference between two sheets, if no difference or < than equal 0

    Thank you, thank you!!

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Calculate the difference between two sheets, if no difference or < than equal 0

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, daffodil's suggestion would work too, you just needed to adjust the ranges
    Last edited by FDibbins; 11-06-2013 at 08:03 PM.

+ 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. Table differences
    By Yathish.d in forum Excel General
    Replies: 1
    Last Post: 08-08-2012, 04:30 PM
  2. Sum of differences
    By Imprisoning in forum Excel General
    Replies: 4
    Last Post: 03-25-2011, 08:17 AM
  3. Value differences between cells
    By iMellroy in forum Excel General
    Replies: 6
    Last Post: 03-01-2011, 07:49 AM
  4. Regional differences
    By tony_sk in forum Excel General
    Replies: 2
    Last Post: 01-19-2007, 10:13 AM
  5. Differences Between Two Times
    By Skoal in forum Excel General
    Replies: 0
    Last Post: 05-12-2005, 11:01 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