+ Reply to Thread
Results 1 to 5 of 5

If's against Vlookups

  1. #1
    Registered User
    Join Date
    05-21-2006
    Location
    Cochrane
    MS-Off Ver
    365
    Posts
    59

    If's against Vlookups

    What is the other option once you have hit the seven if's limitation?
    Paul

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,099
    What's the question? Do you have an example of what you are trying to do?
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,058

    If Against Vllokup

    Quote Originally Posted by Paul Morgan
    What is the other option once you have hit the seven if's limitation?
    Obviously you know there is a seven nested if limit, After that try a Vlookup
    Here is a 7 nested if formula
    =IF(A2=1,"a",IF(A2=2,"b",IF(A2=3,"c",IF(A2=4,"d",IF(A2=5,"e",IF(A2=6,"f",IF(A2=7,"g","Max number of nested If's allowed")))))))
    Here is a vlookup Formula
    =IF(ISERROR(VLOOKUP(A2,Data,2,0)),"Item Not Found",VLOOKUP(A2,Data,2,0))

    Here is an example
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-21-2006
    Location
    Cochrane
    MS-Off Ver
    365
    Posts
    59
    Thank You very much
    it is what I was looking for,
    I am wondering if there is there a way to do vlookup without having to create a table
    Last edited by VBA Noob; 01-19-2008 at 04:03 PM.

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    If you need more than 7 if statement it's easier to use a vlookup. There are workarounds as per links

    http://www.usd.edu/trio/tut/excel/adv/26if.html

    http://www.j-walk.com/ss/excel/usertips/tip080.htm

    http://www.cpearson.com/excel/nested.htm

    If dealing with numbers you could look at Choose function

    http://www.techonthenet.com/excel/formulas/choose.php

    But as oldchippy says better to give an example of the problem

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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