View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Nested If Statement Workaround

This is misleading - you imply that the formula goes into cell B16, but
you can't put the formula there as it refers to that cell.

Pete

driller wrote:

considering B16 is non-negative number
table
A B
1 29 0.099
2 34 0.111
3 39 0.137
4 44 0.2
5 49 0.3
6 54 0.675
7 59 0.852
8 64 1.405
9 69 2.389
10 74 3.869
11 79 6.451

B16 = IF(B1679,0,LOOKUP(B16,$A$1:$A$11,$B$1:$B$11))

"Greg" wrote:

Hi all,
Can anyone assist me with a workaround for the following formula. As you
will be able to see it will not work because of the limit of 8 nested if
statements, but I was hoping someone knew of something that would work
without me using two different cells. The formula is
=if(B16<=29,0.099,if(b16<=34,0.111,if(b16<=39,0.13 7,if(b16<=44,0.2,if(b16<=49,0.3,if(b16<=54,0.675,i f(b16<=59,0.852,if(b16<=64,1.405,if(b16<=69,2.389, if(b16<=74,3.869,if(b16<=79,6.451,0)))))))))))