+ Reply to Thread
Results 1 to 6 of 6

IF Function problem!!! PLEASE HELP...

  1. #1
    Registered User
    Join Date
    12-26-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    3

    Red face IF Function problem!!! PLEASE HELP...

    Hey Guys

    I am trying to make a formula using IF function but I do not understand what is happening. I have on column A fix data ( for example 5 on cell A1, 10 on cell A2 and so on) column B I need to keep blank because the data we need to change every day. The column C I have the formula =IF((-(B1-A1))<0,0,-(B1-A1)) and it works only if I have data on cell B1 otherwise it shows the number that I have on cell A1 as output. I dont want it to show me negative numbers and also if cell B is blank I want to show me 0 as output or just stay blank. I hope I made myself clear.

    Thanks

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: IF Function problem!!! PLEASE HELP...

    If column B is blank your formula will treat the value as being zero, so you end up with 0-A1, because that's inside -( ) it will be converted to a negative number, but as zero minus A1 is going to be negative anyway it will be converted to a positive number, which isn't less than zero, so the value in A1 will be shown.

    I think what you need is probably:

    =MAX(B1-A1,0)

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: IF Function problem!!! PLEASE HELP...

    Try this..

    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: IF Function problem!!! PLEASE HELP...

    In C1 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    12-26-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: IF Function problem!!! PLEASE HELP...

    Thanks so much it worked!!! woop woop u rock :D

  6. #6
    Registered User
    Join Date
    12-26-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: IF Function problem!!! PLEASE HELP...

    Thanks It worked woop woop

+ 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