+ Reply to Thread
Results 1 to 4 of 4

Formula with IF, can't get rid of #VALUE!, works for positive number not negative number.

  1. #1
    Registered User
    Join Date
    03-10-2016
    Location
    North Carolina
    MS-Off Ver
    2013
    Posts
    1

    Cool Formula with IF, can't get rid of #VALUE!, works for positive number not negative number.

    =IF($D6<0,0,($D3*$H6/$I6))

    Formula is working for all lines that have a positive figure in cell D3 but if there is a negative number in D3 such as 25.580-
    then it returns #VALUE!

    Thanks, I thought that might be the issue but still didn't know how to fix it. That worked!
    Last edited by ditty37; 03-10-2016 at 04:25 PM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula with IF, can't get rid of #VALUE!, works for positive number not negative numb

    25.580- is probably not seen by Excel as a number. You can check by entering into an empty cell =ISNUMBER(D6) and it will give a true or false
    So if that is how the data is being imported
    =IF(RIGHT(D6,1)="-", 0, ($D3*$H6/$I6))
    might work
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Formula with IF, can't get rid of #VALUE!, works for positive number not negative numb

    Negative number should be entered as -25.580

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

    Re: Formula with IF, can't get rid of #VALUE!, works for positive number not negative numb

    If this data is imported from text in some way (imported from text file or using the text to columns command), there is an option in the text import wizard (advanced options on the 3rd step) for "trailing minus for negative numbers" that will permit Excel to automatically recognize this scenario and capture the negative numbers correctly.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Replies: 9
    Last Post: 02-04-2016, 01:18 AM
  2. [SOLVED] Formula to show positive number instead of negative
    By werko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-10-2015, 04:24 AM
  3. Carrying Over Negative number to next column as a positive number
    By Redraven in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-21-2014, 06:39 AM
  4. [SOLVED] How do I treat a negative number as a positive in a formula?
    By Thistledown in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-05-2013, 08:13 AM
  5. Formula calculate based on negative or positive number
    By oxicottin in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-15-2012, 12:45 PM
  6. Formula to calculate difference between a negative and positive number.
    By zumwaj01 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-25-2012, 02:13 PM
  7. Replies: 4
    Last Post: 06-08-2012, 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