+ Reply to Thread
Results 1 to 3 of 3

If function

Hybrid View

  1. #1
    Mitch Perala via OfficeKB.com
    Guest

    If function

    If A2 minus 40 is less than zero then display zero in A15, or if A2 minus 40 is greater than 40 then run multiply A2 by 40 and display that in A15.

    --
    Message posted via http://www.officekb.com

  2. #2
    tjtjjtjt
    Guest

    RE: If function

    Put one of these in A15.

    If you don't need to account for exactly zero:
    =IF(A2-40<0,0,A2*40)

    If you do need to account for exactly zero and want to just return zero in
    the cell, you might try something like:
    =IF(A2-40<=0,0,A2*40)

    tj

    "Mitch Perala via OfficeKB.com" wrote:

    > If A2 minus 40 is less than zero then display zero in A15, or if A2 minus 40 is greater than 40 then run multiply A2 by 40 and display that in A15.
    >
    > --
    > Message posted via http://www.officekb.com
    >


  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Two alternatives for cell A15:
    =IF(ISNUMBER(A2),IF(A2-40<0,0,IF(A2-40>40;A2*40,"")),"")
    or
    =CHOOSE(1+ISNUMBER(A2)+(A2-40>=0)+(A2-40>40),"",0,"",A2*40)

    Ola Sandstrom

+ 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