+ Reply to Thread
Results 1 to 8 of 8

replacement for IF function?

  1. #1
    Registered User
    Join Date
    04-30-2006
    Posts
    62

    replacement for IF function?

    I have 22 options. Instead of using the IF function what can I use or can I use the IF function w/ another function? This is what I have.

    Cells A1, A2, A3 and so on

    This is what I started w/ the IF function:

    =IF(A1=0,22,IF(A2=0,21,IF(A3=0,20 and so on

    Thanks,

  2. #2
    damorrison
    Guest

    Re: replacement for IF function?

    Are you trying to find a value that is in a range?


  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Debra Dalgleish's website should get you pointed in the right direction. See the section on the VLOOKUP function here:

    http://www.contextures.com/xlFunctions02.html

    Regards,
    Ron

  4. #4
    Registered User
    Join Date
    04-30-2006
    Posts
    62
    A1, A2, A3 and so on is the total money from other cells, so if A1 = 0 then I want the cell to show 22, which is for the # of days left in the month, if there is a value other then 0, go on to A2 and if A2=0 show 21 and so on.

    Basically if
    A1 = 0 (result 22) - if not then test A2
    A2 = 0 (result 21) - if not then test A3
    A3 = 0 (result 20) and so, testing each one until it finds the cell that equals 0

  5. #5
    Dana DeLouis
    Guest

    Re: replacement for IF function?

    Hi. Given your example, if Rng refers to A1:A23, then perhaps this array
    formula:

    =23-MIN(IF(Rng=0,ROW(Rng)))

    --
    HTH. :>)
    Dana DeLouis
    Windows XP, Office 2003


    "fastballfreddy"
    <fastballfreddy.27gola_1147045801.1867@excelforum-nospam.com> wrote in
    message news:fastballfreddy.27gola_1147045801.1867@excelforum-nospam.com...
    >
    > A1, A2, A3 and so on is the total money from other cells, so if A1 = 0
    > then I want the cell to show 22, which is for the # of days left in the
    > month, if there is a value other then 0, go on to A2 and if A2=0 show 21
    > and so on.
    >
    > Basically if
    > A1 = 0 (result 22) - if not then test A2
    > A2 = 0 (result 21) - if not then test A3
    > A3 = 0 (result 20) and so, testing each one until it finds the cell
    > that equals 0
    >
    >
    > --
    > fastballfreddy
    > ------------------------------------------------------------------------
    > fastballfreddy's Profile:
    > http://www.excelforum.com/member.php...o&userid=33986
    > View this thread: http://www.excelforum.com/showthread...hreadid=539700
    >




  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    ...or just

    =23-MATCH(0,A1:A23,0)

  7. #7
    Registered User
    Join Date
    04-30-2006
    Posts
    62
    I just wanted to thank everybody for their replies. I ended up using the vlookup.

  8. #8
    Dana DeLouis
    Guest

    Re: replacement for IF function?

    > =23-MATCH(0,A1:A23,0)

    I like it! Thanks. :>)
    Another advantage your equation has is that it returns an error (#N/A) if
    there are no zero's.
    Thanks. :>)
    --
    Dana DeLouis

    "daddylonglegs" <daddylonglegs.27gqwm_1147048801.1232@excelforum-nospam.com>
    wrote in message
    news:daddylonglegs.27gqwm_1147048801.1232@excelforum-nospam.com...
    >
    > ..or just
    >
    > =23-MATCH(0,A1:A23,0)
    >
    >
    > --
    > daddylonglegs
    > ------------------------------------------------------------------------
    > daddylonglegs's Profile:
    > http://www.excelforum.com/member.php...o&userid=30486
    > View this thread: http://www.excelforum.com/showthread...hreadid=539700
    >




+ 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