#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 99
Default formula question

Need help. Need to be able to basically perform 2 vlookups. Here is the
example:

Division Part # Cost/ LB Cost/ingredient
12 1253 5 0.8
12 1246 2 0.3
13 1234 1 0.5
13 1278 3 0.6
14 1278 3 0.6
15 1234 1 0.5

I want to be able to write a formula that finds the division number and for
that division number, find the part number I specify and then give me the
cost per pound or cost per ingredient. Can someone help me please? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default formula question

One generic way,
which returns text data or nums or mixed data ..
and doesn't require array-entering

Assuming source table as posted in A1:D7
Assume the 2 variables are div: 12, part#: 1246

In say, F2, normal ENTER to confirm:
=INDEX(C2:C7,MATCH(1,INDEX((A2:A7=12)*(B2:B7=1246) ,),0))
returns col C [cost/lb]

Just change the index part of it : INDEX(C2:C7,
to: INDEX(D2:D7,
if you want to return the result from col D [cost/ingredient]

Adapt the ranges to suit

Click YES below to thumbs up
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"Wendy" wrote:
Need help. Need to be able to basically perform 2 vlookups. Here is the
example:

Division Part # Cost/ LB Cost/ingredient
12 1253 5 0.8
12 1246 2 0.3
13 1234 1 0.5
13 1278 3 0.6
14 1278 3 0.6
15 1234 1 0.5

I want to be able to write a formula that finds the division number and for
that division number, find the part number I specify and then give me the
cost per pound or cost per ingredient. Can someone help me please? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default formula question

Try this...

Data in the range A2:D7

Use cells to hold your search criteria.

F2 = some division
G2 = some part number

Enter this formula in H2 for the cost/lb:

=SUMPRODUCT(--($A2:$A7=$F2),--($B2:$B7=$G2),C2:C7)

Drag copy across to I2 for the cost/I.

--
Biff
Microsoft Excel MVP


"Wendy" wrote in message
...
Need help. Need to be able to basically perform 2 vlookups. Here is the
example:

Division Part # Cost/ LB Cost/ingredient
12 1253 5 0.8
12 1246 2 0.3
13 1234 1 0.5
13 1278 3 0.6
14 1278 3 0.6
15 1234 1 0.5

I want to be able to write a formula that finds the division number and
for
that division number, find the part number I specify and then give me the
cost per pound or cost per ingredient. Can someone help me please?
Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default formula question

On Wed, 18 Feb 2009 16:38:00 -0800, Wendy
wrote:

Need help. Need to be able to basically perform 2 vlookups. Here is the
example:

Division Part # Cost/ LB Cost/ingredient
12 1253 5 0.8
12 1246 2 0.3
13 1234 1 0.5
13 1278 3 0.6
14 1278 3 0.6
15 1234 1 0.5

I want to be able to write a formula that finds the division number and for
that division number, find the part number I specify and then give me the
cost per pound or cost per ingredient. Can someone help me please? Thanks.


Assuming table is in A1:D7 --

Cost/LB
=SUMPRODUCT(($A$2:$A$7=Division)*($B$2:$B$7=PartNu m)*$C$2:$C$7)

Cost/Ingredient
=SUMPRODUCT(($A$2:$A$7=Division)*($B$2:$B$7=PartNu m)*$D$2:$D$7)
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula question sssspro Excel Worksheet Functions 6 October 28th 06 03:18 AM
Need help with a formula question swtanjewel Excel Discussion (Misc queries) 3 August 22nd 06 03:15 PM
formula question DEE Excel Worksheet Functions 2 July 10th 06 05:21 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
formula QUESTION Excel Worksheet Functions 2 November 10th 05 12:18 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"