What is the other option once you have hit the seven if's limitation?
What is the other option once you have hit the seven if's limitation?
Paul
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
Obviously you know there is a seven nested if limit, After that try a VlookupOriginally Posted by Paul Morgan
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
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.
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 !!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks