View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default HELP. I need an "IF" formula with a lot of information

Build a lookup table. On another sheet (Sheet3 in my example), enter the list
of animals in column A and the value to return for each next to it in column
B. Then, on the sheet where you are specifying an animal in A1, enter this
formula in the cell where you want the value returned:

=IF(ISERROR(VLOOKUP(A1,Sheet3!A:B,2,FALSE)),"Not
found",VLOOKUP(A1,Sheet3!A:B,2,FALSE))

This formula is using Vlookup to find the A1 animal in the table on Sheet3
and return the value next to it. I have wrapped the Vlookup in an IF(ISERROR(
construction so if the animal is not found on Sheet3, "Not found" is returned
instead of a #N/A error. Change Sheet3 to whatever sheet name you use, and
change "Not found" to some other text (or a number) if desired. When you have
new animals, you just add them to the lookup table on Sheet3.

Hope this helps,

Hutch

"Onyx_jh" wrote:

I am trying to build an "IF" formula with a lot of parameters. e.g.
=IF(A1="CAT",12.5,IF(A1="DOG", 50.6,IF(... Just continue that on
for most of the animals out there to see the size I'm going for. I can get
up to about 7 entries and I get the message "The specified formula cannot be
entered because it uses more levels of nesting than are allowed in the
current file format". I don't know if I need to split the formula some how
or just what. If possible I do need these in the same function. Any help or
ideas/suggestions would deeply appreciated. Thank you.