+ Reply to Thread
Results 1 to 4 of 4

Checking for Negative Numbers

  1. #1
    Registered User
    Join Date
    10-29-2009
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    4

    Exclamation Checking for Negative Numbers

    I'm working on checking for negatives in an Excel sheet. The way information comes to me, it uses {#-} (# representing a number). So when I try to check if it is negative, it believes it is postive.

    Ex. -2 = Negative but 2- is Positive.

    Because of this issue, I'm trying to create a formula that figures if a cell has a "-" in it, then =LEFT(E22,1)*-1, otherwise, just display the positive value.

    What combination would be easier? I'd appreciate any help with this one...

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Checking for Negative Numbers

    Why not check if the number is less than zero?

    =IF(E22<0,"number is negative,"number is positive")

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Checking for Negative Numbers

    How about
    =SIGN(0.5-(ISNUMBER(FIND("-",G4))))*SUBSTITUTE(G4,"-","")
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    10-29-2009
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Checking for Negative Numbers

    Thanks Mike! Worked like a charm!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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