View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
driller driller is offline
external usenet poster
 
Posts: 740
Default Nested If Statement Workaround


sorry guys, i paste the old formula with Lookup versatility...

here it is..
place formula say on cell H1 (good on as-is basis the step 5 increment but
can be modify )
=IF(G179,0,IF(G1LOOKUP(G1,$A$1:$A$12,$A$1:$A$12) ,LOOKUP((G1+5),$A$1:$A$12,$B$1:$B$12),LOOKUP((G1), $A$1:$A$12,$B$1:$B$12)))

place your lookup value on cell G1 (=0)

your table

A B
1 0 0.099
2 29 0.099
3 34 0.111
4 39 0.137
5 44 0.2
6 49 0.3
7 54 0.675
8 59 0.852
9 64 1.405
10 69 2.389
11 74 3.869
12 79 6.451

if u want to adjust the data on Column B, no need to adjust the formula...

"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)))))))))))