#1   Report Post  
Junior Member
 
Posts: 1
Default Using MATCH here

hi all of you,

I have one problem need your help

A sheet with the data below

TABLE 1 TABLE 2
INDEX Q'TY PRICE TOTAL INDEX Q'TY TOTAL AVG
1 100 2 200 12 SUM(B3+B4) SUM(D3+D4)
2 200 3 600 13 SUM(B3+B5) SUM(D3+D5)
3 300 4 1,200 14 SUM(B3+B6) SUM(D3+D6)
4 400 5 2,000 15
5 500 6 3,000 23
24
25
34
35
123 SUM(B3+B4+B5) SUM(D3+D4+D6)


Problem is to solve as
The function in column "Q'TY" in table 2 will lookup the number (value) in colume "INDEX" in table 2 to colume "INDEX" in table 1
then calculate the quantity. In my case as number 12 in colum "INDEX" in table 2 is a combination between number 1 and 2, so SUM(B3+B4)

Similarly to the culume "TOTAL" in table 2

Please, anyone can help to solve this function, VBA, or macro

Thanks in advance!
Attached Files
File Type: zip Book2.zip (2.2 KB, 111 views)
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 2,646
Default Using MATCH here

Try
=INDEX(B:B,MATCH(VALUE(LEFT(F2)),A:A,0))+INDEX(B:B ,MATCH(VALUE(RIGHT(F2)),A:A,0))

in place of SUM(B3+B4) (this is really SUM(B2+B3), check it!) and expand the
logic to the other formulae!

Regards,
Stefi

€˛timgiaiphap€¯ ezt Ć*rta:


hi all of you,

I have one problem need your help

A sheet with the data below

TABLE 1 TABLE 2
INDEX Q'TY PRICE TOTAL INDEX Q'TY TOTAL AVG
1 100 2 200 12 SUM(B3+B4) SUM(D3+D4)
2 200 3 600 13 SUM(B3+B5) SUM(D3+D5)
3 300 4 1,200 14 SUM(B3+B6) SUM(D3+D6)
4 400 5 2,000 15
5 500 6 3,000 23
24
25
34
35
123 SUM(B3+B4+B5) SUM(D3+D4+D6)


Problem is to solve as
The function in column "Q'TY" in table 2 will lookup the number (value)
in colume "INDEX" in table 2 to colume "INDEX" in table 1
then calculate the quantity. In my case as number 12 in colum "INDEX"
in table 2 is a combination between number 1 and 2, so SUM(B3+B4)

Similarly to the culume "TOTAL" in table 2

Please, anyone can help to solve this function, VBA, or macro

Thanks in advance!


+-------------------------------------------------------------------+
|Filename: Book2.zip |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=129|
+-------------------------------------------------------------------+



--
timgiaiphap

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
Need to match 2 columns, if a match found add info from 2nd column Stratton Excel Worksheet Functions 1 October 8th 08 02:55 PM
index(match) Wind Uplift Calculations (match four conditions) JMeier Excel Worksheet Functions 8 August 1st 08 01:45 AM
MATCH Multiple Criteria & Return Previous / Penultimate Match Sam via OfficeKB.com Excel Worksheet Functions 27 October 6th 07 01:39 AM
index match array function-returning only first match, need last. Julie Olsen Excel Worksheet Functions 3 December 29th 06 12:50 AM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM


All times are GMT +1. The time now is 02:47 AM.

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"