+ Reply to Thread
Results 1 to 8 of 8

Excel IF statement for more than 7

  1. #1
    Registered User
    Join Date
    08-07-2009
    Location
    Calcutta
    MS-Off Ver
    Excel 2000
    Posts
    15

    Excel IF statement for more than 7

    Hello again..

    In my spreadsheet, I need to enter the formula for D5 as below :

    =IF(D1=U8,(T8),IF(D1=U9,(T9),IF(D1=U10,(T10),IF(D1=U11,(T11),IF(D1=U12,(T12),IF(D1=U13,(T13),IF(D1=U14,(T14),IF(D1=U15,(T15),IF(D1=U16,(T16),IF(D1=U17,(T16),IF(D1=U18,(T18),IF(D1=U19,(T19)))))))))))))

    but it seems that excel cannot accept more than 7 IF statements. Someone could help me ?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel IF statement for more than 7

    Try:

    =Index(T8:T19,Match(D1,U8:U19,0))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Excel IF statement for more than 7

    Try this:

    =LOOKUP(D1;U8:U19;T8:T19)

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Excel IF statement for more than 7

    Also try the forum's search function.....

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel IF statement for more than 7

    Quote Originally Posted by zbor View Post
    Try this:

    =LOOKUP(D1;U8:U19;T8:T19)
    Only works only if U8:U19 is in alphabetic or numeric ascending order.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Excel IF statement for more than 7

    oh, yes, true...
    I was lazy for writting example so I pull down from 1 to n and it worked

    Index is good approach.

  7. #7
    Registered User
    Join Date
    08-07-2009
    Location
    Calcutta
    MS-Off Ver
    Excel 2000
    Posts
    15

    Talking Re: Excel IF statement for more than 7

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@ THANKS A LOT @@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Thanks NBVC, its working. But sorry Zbor, your suggestion is not working, giving error message. But thanks for helping me..

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel IF statement for more than 7

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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