View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default obtaining data from a list


Absolutely. You have a lot of questions here so this will be long.
First, to set up your drop downs, you should create some lists. One
for the Material options, one for the corresponding Material thk's (I
assume thickness). Then you'll need to create a table that you can
return the lbs/sqft from based on the Material and thk columns. I
assume you need to apply both conditions since you may have some
materials that are of the same thickness but weigh less.

I used the array of A1:C9 for this example. I put a list of
thicknesses based on material cs in J3:J7 leaving J2 blank and ss in
K3:K5 leaving K2 blank. In
N1 and N2 I have cs and ss for te materials list.

In cell A2, select DataValidation. On the Settings tab, select Allow:
List from the option. In the Source box, N1:N2. Click OK. This is
your materials drop down.

In cell B2 go to data validation again and Allow: List. In the Source
box type the following formula.

=IF(A2="cs",$J$2:$J$7,IF(A2="ss",$K$2:$K$5))

This will direct the drop down to refer to your lists for the different
materials only.

Set up a table for your lbs/sqft lookup. In the first column put the
Materials, in the second your thicknesses and then the corresponding
lbs/sqft in the third. Where you want the lbs/sqft to appear (I used
column C next to the thk column), use SUMRODUCT to pull in the number.
In O1:Q9 I put my table. The SUMPRODUCT would be:

=IF(SUMPRODUCT(--($O$1:$O$8=A2),--($P$1:$P$8=B2),($Q$1:$Q$8))=0,"",SUMPRODUCT(--($O$1:$O$8=A2),--($P$1:$P$8=B2),($Q$1:$Q$8)))

Copy this down the list. You could also use lookup formulas as well.
Hopefully this is what you were looking for.



Cheers,

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=515971