+ Reply to Thread
Results 1 to 4 of 4

IF statement help

Hybrid View

  1. #1
    Holly
    Guest

    IF statement help

    A B C
    8 2 1

    In column C I have the following
    =IF(A2>7,1,IF(A2>=6,2,IF(A2>=3,3,IF(A2>=1,4,5))))
    which is working for me however I would like this formula to also perform
    the following.
    If cell B2 > 0 i want it to subtract 1 from the result
    (the actual number in C should be a zero)

    Is this possible?

  2. #2
    Ryan Poth
    Guest

    RE: IF statement help

    Try:
    =IF(A2>7,1,IF(A2>=6,2,IF(A2>=3,3,IF(A2>=1,4,5))))-IF(B2>0,1,0)

    HTH,
    Ryan

    "Holly" wrote:

    > A B C
    > 8 2 1
    >
    > In column C I have the following
    > =IF(A2>7,1,IF(A2>=6,2,IF(A2>=3,3,IF(A2>=1,4,5))))
    > which is working for me however I would like this formula to also perform
    > the following.
    > If cell B2 > 0 i want it to subtract 1 from the result
    > (the actual number in C should be a zero)
    >
    > Is this possible?


  3. #3
    Bob Phillips
    Guest

    Re: IF statement help

    =IF(A2>7,1,IF(A2>=6,2,IF(A2>=3,3,IF(A2>=1,4,5))))-(B2>0)


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Holly" <Holly@discussions.microsoft.com> wrote in message
    news:A7A3C63A-C575-43B2-8382-08AA09D5BC37@microsoft.com...
    > A B C
    > 8 2 1
    >
    > In column C I have the following
    > =IF(A2>7,1,IF(A2>=6,2,IF(A2>=3,3,IF(A2>=1,4,5))))
    > which is working for me however I would like this formula to also perform
    > the following.
    > If cell B2 > 0 i want it to subtract 1 from the result
    > (the actual number in C should be a zero)
    >
    > Is this possible?




  4. #4
    Arvi Laanemets
    Guest

    Re: IF statement help

    Hi

    =1+(A2>7)+(A2>=6)+(A2>=3)+(A2>=1)-(B2>0)
    Another one
    =MATCH(A2,{9999;7;5.9;2.9;0.9;-9999},-1)-(B2>0)


    --
    Arvi Laanemets
    ( My real mail address: arvi.laanemets<at>tarkon.ee )



    "Holly" <Holly@discussions.microsoft.com> wrote in message
    news:A7A3C63A-C575-43B2-8382-08AA09D5BC37@microsoft.com...
    > A B C
    > 8 2 1
    >
    > In column C I have the following
    > =IF(A2>7,1,IF(A2>=6,2,IF(A2>=3,3,IF(A2>=1,4,5))))
    > which is working for me however I would like this formula to also perform
    > the following.
    > If cell B2 > 0 i want it to subtract 1 from the result
    > (the actual number in C should be a zero)
    >
    > Is this possible?




+ 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