+ Reply to Thread
Results 1 to 10 of 10

Formula for a negative value...

  1. #1
    Registered User
    Join Date
    12-06-2015
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    79

    Question Formula for a negative value...

    I'm looking for a formula that will automatically make B1 zero, when A2 becomes negative

    Price(A1): 66.33
    Profit(A2): -1.38

    Price(B1): 67.64
    Formula for B1: 67.91+(A2*20%)
    Last edited by clogistics; 12-07-2015 at 03:05 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula for a negative value...

    yet present which formula you have in B1
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Formula for a negative value...

    You can use the IF CONDITION to force a zero as shown below

    Please Login or Register  to view this content.
    Regards
    e4excel

  4. #4
    Registered User
    Join Date
    12-06-2015
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Formula for a negative value...

    Formula for B1: 67.91+(A2*20%)

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula for a negative value...

    try below
    B1: 67.91+(a2>0)*(A2*20%)
    pr
    B1: 67.91+max(0,A2*20%)

  6. #6
    Registered User
    Join Date
    12-06-2015
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Formula for a negative value...

    Quote Originally Posted by nflsales View Post
    try below
    B1: 67.91+(a2>0)*(A2*20%)
    pr
    B1: 67.91+max(0,A2*20%)
    Both the formulas are resulting to the 67.91 value.

  7. #7
    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,178

    Re: Formula for a negative value...

    Are you saying that if A2 is negative then B1 is 0 i.e. we ignore the 67.91 in your example

    =IF(A2<0,0,67.91+(A2*20%) ???

  8. #8
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Formula for a negative value...

    same with formula above.

  9. #9
    Registered User
    Join Date
    12-06-2015
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Formula for a negative value...

    Quote Originally Posted by JohnTopley View Post
    Are you saying that if A2 is negative then B1 is 0 i.e. we ignore the 67.91 in your example

    =IF(A2<0,0,67.91+(A2*20%) ???
    This formula worked perfect. Thanks!

  10. #10
    Registered User
    Join Date
    12-06-2015
    Location
    Michigan
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Formula for a negative value...

    Thanks for all the help, everybody .

+ 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] 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
  2. Replies: 4
    Last Post: 01-15-2013, 11:55 PM
  3. Replies: 1
    Last Post: 04-26-2012, 12:48 AM
  4. IF negative formula
    By KINNEY0201 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-15-2010, 11:09 AM
  5. Replies: 5
    Last Post: 05-12-2009, 04:47 PM
  6. Replies: 1
    Last Post: 11-20-2008, 01:52 AM
  7. Replies: 4
    Last Post: 09-26-2005, 06:05 PM
  8. Excel Formula Negative/Negative =+%
    By BigDon in forum Excel General
    Replies: 1
    Last Post: 05-31-2005, 09:05 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