markbanker
Programmer
I have a sheet that contains a list of books and their associated prices. On my other sheet you enter a bookID. This bookID is used to identify a book and find its price. I used a series of 7 nested if statements that look to the book sheet, find the appropriate book and return its price. So far, so good. The problem is...there are many more than 7 books. According to Excel Help, you can only nest 7 if statements. If I add more, it breaks.
So, my thought was to do the 7 nested ifs, and then an OR followed by a series of 7 nested ifs, etc. It won't accept the OR following the nested ifs.
The next thing I tried was to dynamically build a reference to the books sheet by concatenating the sheet reference and the bookID number, in this manner: ="Books!c"&B2. This seems that it would be the most efficient way to accomplish this task.
The problem with this is that the result of concatentation is a string object, rather than a reference to another sheet. It just displays the resultant string. I tried enclosing it in an eval() function, thinking that it would cause it to evaluate the string like the reference that it is, but no such luck. I tried several other things and all have failed.
I greatly appreciate all of you who take the time to consider this issue on my behalf.
Thanks,
Mark Banker
“Coffee should be black as hell, strong as death, and sweet as love.”
- Turkish proverb
So, my thought was to do the 7 nested ifs, and then an OR followed by a series of 7 nested ifs, etc. It won't accept the OR following the nested ifs.
The next thing I tried was to dynamically build a reference to the books sheet by concatenating the sheet reference and the bookID number, in this manner: ="Books!c"&B2. This seems that it would be the most efficient way to accomplish this task.
The problem with this is that the result of concatentation is a string object, rather than a reference to another sheet. It just displays the resultant string. I tried enclosing it in an eval() function, thinking that it would cause it to evaluate the string like the reference that it is, but no such luck. I tried several other things and all have failed.
I greatly appreciate all of you who take the time to consider this issue on my behalf.
Thanks,
Mark Banker
“Coffee should be black as hell, strong as death, and sweet as love.”
- Turkish proverb