+ Reply to Thread
Results 1 to 3 of 3

Negative value causing issues

  1. #1
    Registered User
    Join Date
    10-13-2007
    Location
    NW England, Lancashire
    MS-Off Ver
    Office for Mac 2011
    Posts
    42

    Negative value causing issues

    Hello all, i have what i thought would be a relativley easy problem to solve but i am struggling like mad with it. This is the problem. in Cell C3 i have 1158 and in Cell C4 i have 1163. C5 C6 C7 will when appropriate get numbers in as well. I want to subtract C3 from C4 and show the answer in D4 (the answer being 5 and being in D4) However when i continue the formatting down column D when i get a minus figure in D5 then the rest of the column is filled with zreos. That makes no sense so here is the sample from the sheet.
    Any help please
    Mike
    Attached Files Attached Files

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    When a formula refers to a blank cell, Excel interprets the blank as 0.
    So your formula in D5 =C5-C4 = 0 - 1163 = -1163
    and D6 = C5 - C5 = 0 - 0 = 0, etc.

    You could use =MAX(C5-C4,0) to prevent the negative numbers.

    I personaly would avoid formulas like =IF(ISNUMBER(C5),C5-C4,"") that leave a string where other formulas may expect a number.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    10-13-2007
    Location
    NW England, Lancashire
    MS-Off Ver
    Office for Mac 2011
    Posts
    42
    Many Thanks Sir. Problem solved.

+ 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. Find negative value and apply to next positive value
    By jamphan in forum Excel General
    Replies: 5
    Last Post: 07-16-2008, 04:52 PM
  2. Change Positive to Negative
    By blitzburgh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2007, 01:52 PM
  3. Summing positive numbers before hitting a negative
    By warburger in forum Excel General
    Replies: 3
    Last Post: 08-23-2007, 03:03 PM
  4. Ignoring Negative Values?
    By Copey in forum Excel General
    Replies: 1
    Last Post: 02-25-2007, 12:36 PM
  5. Smear ut negative values over positive
    By a94andwi in forum Excel General
    Replies: 4
    Last Post: 02-23-2007, 04:12 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