View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default nested if statements

=VLOOKUP(D7,{3,0.376;4,0.668;5,1.043;6,1.502},2,FA LSE)

if you will use this formula in many cells, store the values in a table and
lookup that table

--

HTH

RP
(remove nothere from the email address if mailing direct)


"steve" wrote in message
...
i use the following if statement in my sheet:

=IF(D7=3,0.376,IF(D7=4,0.668,IF(D7=5,1.043,IF(D7=6 ,1.502)))))

the problem is that 7 IF statements is the max, and i have 11 that i need

to
use. do i need to switch to a macro? here is how the list goes. the

first
column is the size of the bar, the second column is the weight(pounds per
foot)

3 .376
4 .668
5 1.043
6 1.502
7 2.044
8 2.67
9 3.4
10 4.303
11 5.313
14 7.650
18 13.6