+ Reply to Thread
Results 1 to 3 of 3

trying to modify IF Statement result

  1. #1
    Forum Contributor
    Join Date
    05-06-2004
    Posts
    117

    trying to modify IF Statement result

    Hello to all, I have an IF statement that sometimes results with a negative number. I would like to show a zero when my IF statement yields such result. So far, I am using the following formulat without any luck IF(IF(I132>K132,0,I132-K132)>=0,0,IF(I132>K132,0,I132-K132))
    Any help is greatly appreciated.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695
    It's difficult to see exactly what result you require. If your original IF function is

    =IF(I132>K132,0,I132-K132)

    then this will always generate either a zero or a negative number, so if you amend the formula to replace negative numbers with zero, your new formula will only ever return zero

    I assume you want

    =MAX(0,I132-K132)

    or perhaps

    =MAX(0,K132-I132)

  3. #3
    Forum Contributor
    Join Date
    05-06-2004
    Posts
    117
    Thank you so much for your help. Using the Max functions has solved the problem that i had.
    Thank you again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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