+ Reply to Thread
Results 1 to 8 of 8

One cell minus another

  1. #1
    Registered User
    Join Date
    03-30-2016
    Location
    FRESNO,CA
    MS-Off Ver
    MAC
    Posts
    3

    One cell minus another

    I am using a spread sheet to calculate estimates. when i type in g7 - h7 (g7 being a positive number and h7 being 0. I am getting a negative total. it would be like subtracting 0-200 - you would still get 200. I am getting -200. any thoughts

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: One cell minus another

    Welocme to the board.

    when i type in g7 - h7 (g7 being a positive number and h7 being 0. I am getting a negative total.
    Not if h7 is 0.

    it would be like subtracting 0-200 - you would still get 200.
    0 minus 200 is -200, not 200.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-30-2016
    Location
    FRESNO,CA
    MS-Off Ver
    MAC
    Posts
    3

    Re: One cell minus another

    how do i get that to be a posotive #

  4. #4
    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
    52,929

    Re: One cell minus another

    Agree with shg, 0-200 is -200 not 200
    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

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: One cell minus another

    0-200=-200
    200-0=200
    ABS(0-200)=200
    ABS(200-0)=200

    Perhaps you are looking for the ABS() Absolute Value function?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    03-30-2016
    Location
    FRESNO,CA
    MS-Off Ver
    MAC
    Posts
    3

    Re: One cell minus another

    Much closer Mr. Shorty - thank you. I am trying to find the difference from two cells. for example - I provide an allotment of say 100$ for a product, customer goes out and spends 150. - customer would owe me 50$ and visa versa if the amount was less.. the problem i am having when customer has not picked out anything and I put a 0 in for allotted amount then the total number is coming out negative.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: One cell minus another


  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: One cell minus another

    Some of this just isn't making sense. You say that you want to find the difference between two cells (cell1-cell2), then, when that subtraction is performed, you are unhappy with the result. I'm not understanding (and I would guess that the others are not as well) exactly what you want.
    allotted -- spent -- difference
    100 -- 150 -- =150-100 -> +50 positive result indicates that spent was greater than allotted
    150 -- 100 -- =100-150 -> -50 negative result indicates allotted was greater than spent
    100 -- 0 (transaction pending) -- 0-100 -> -100 negative result indicates that transaction has not yet occurred (so is correctly showing that allotted is greater than spent because nothing has been spent, yet).

    Is that the kind of thing you are looking at? What is wrong with the negative result in the final example? What would you like it to show instead of the "natural" difference of -100? (Perhaps what you are really looking for is an IF() function that will test for "transaction pending" and not compute the difference?)

+ 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] Swits leading minus and put minus infront of numbers without macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2015, 11:40 AM
  2. Minus one cell from another
    By Guinness2014 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-23-2014, 06:11 AM
  3. [SOLVED] MAX IF Minus 1 Cell
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-15-2014, 06:16 AM
  4. [SOLVED] How to get the correct (minus) answer for a minus raised to a power
    By enginezzz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-27-2013, 08:44 PM
  5. [SOLVED] I neeed help on changing a minus figure so it does not show a minus
    By Kirstg in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-24-2012, 11:44 AM
  6. [SOLVED] CHANGE TRAILING MINUS TO BRACKETS OR PRECEEDING MINUS
    By Socal Analyst looking for help in forum Excel General
    Replies: 2
    Last Post: 05-12-2006, 02:20 PM
  7. how do you count a column minus dupicates minus blanks.
    By notEXCELing in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-10-2005, 08:48 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