+ Reply to Thread
Results 1 to 5 of 5

IF function using negative and positive numbers

  1. #1
    Registered User
    Join Date
    07-02-2014
    Location
    Michigan
    MS-Off Ver
    Office 16
    Posts
    8

    IF function using negative and positive numbers

    Is there a way to make this formula also measure the exact same negative numbers?
    I know it sounds odd, but at the moment if there is between 5 and 19.99 in cell B2 1 point is assigned.

    I need to also assign 1 point if the cell B2 has between negative 5 and negative 19.99.


    This is the current formula that works for positive numbers:
    =IF(AND(B2>=5,B2<=19.99),1,IF(AND(B2>=20,B2<=39.99),2,0))

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: IF function using negative and positive numbers

    Use ABS on each occurrence of B2

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-02-2014
    Location
    Michigan
    MS-Off Ver
    Office 16
    Posts
    8

    Re: IF function using negative and positive numbers

    That worked perfectly. Thanks!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: IF function using negative and positive numbers

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon addreputationiconsmall.jpg below their name.

  5. #5
    Registered User
    Join Date
    06-26-2019
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    26

    Re: IF function using negative and positive numbers

    Hi MindyLeigh

    While "hard coding" the formula is fine, but if the parameters changed you end up having to change the formula across the range.

    I have attached a spreadsheet which allows you to have flexible thresholds. If the value is below the threshold it will have the lower value.
    Attached Files Attached Files

+ 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. Convert negative numbers to positive numbers using Excel "Find and Replace" Function
    By FoodieJoan In LA in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-05-2015, 09:40 PM
  2. [SOLVED] Function for set of numbers being all positive or negative
    By Brennen81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2014, 08:56 AM
  3. [SOLVED] SUMIF positive and negative numbers - take double a negative number?
    By Zordrail in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2014, 08:34 AM
  4. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM
  5. adding positive and negative numbers all as positive
    By tomvh444 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2009, 04:08 PM
  6. Replies: 1
    Last Post: 11-20-2008, 01:52 AM
  7. [SOLVED] Erf (the error function) for both negative and positive numbers
    By Kara in forum Excel General
    Replies: 0
    Last Post: 02-06-2005, 10:06 PM

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