Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Nav
 
Posts: n/a
Default Vlookup 2 data matches?

I have a list of data (2 sets) , I need the data to be picked up from from 1
set if the Customer ID and the Date of purchase match together. I am aware
VLOOKUP will match and lokkup if one of the sets of data agrees, but is it
possible to pick up the 4th column if the customer ID AND the date match from
the first data set to the second data set? Please can someone help. Thanks
in advance.

EG.
Data set 1
ID Date Qty Total
1 1/12/05 5 1500
1 3/12/05 5 1500
2 2/12/05 10 2500

Data set 2
ID Date Total
1 3/12/05 (= formulae required to match both ID and date as
criteria.)

  #2   Report Post  
Posted to microsoft.public.excel.misc
duane
 
Posts: n/a
Default Vlookup 2 data matches?

you can do that with a sumproduct function - note you will get the sum of all
matches of the two criteria.

with your data in a2:d5 and desired id in a7, desired date in b7, this does
"lookup" on column C

=SUMPRODUCT((A2:A5=A7)*(B2:B5=B7)*(C2:C5))

"Nav" wrote:

I have a list of data (2 sets) , I need the data to be picked up from from 1
set if the Customer ID and the Date of purchase match together. I am aware
VLOOKUP will match and lokkup if one of the sets of data agrees, but is it
possible to pick up the 4th column if the customer ID AND the date match from
the first data set to the second data set? Please can someone help. Thanks
in advance.

EG.
Data set 1
ID Date Qty Total
1 1/12/05 5 1500
1 3/12/05 5 1500
2 2/12/05 10 2500

Data set 2
ID Date Total
1 3/12/05 (= formulae required to match both ID and date as
criteria.)

  #3   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Vlookup 2 data matches?

Assumptions:

A1:D1 contains your headers/labels

A2:D4 contains your data

Formula:

=INDEX($D$2:$D$4,MATCH(1,($A$2:$A$4=F2)*($B$2:$B$4 =G2),0))

....where F2 contains the ID of interest, and G2 contains the date of
interest.

Note that the formula needs to be confirmed with CONTROL+SHIFT+ENTER,
not just ENTER

Hope this helps!

In article ,
Nav wrote:

I have a list of data (2 sets) , I need the data to be picked up from from 1
set if the Customer ID and the Date of purchase match together. I am aware
VLOOKUP will match and lokkup if one of the sets of data agrees, but is it
possible to pick up the 4th column if the customer ID AND the date match from
the first data set to the second data set? Please can someone help. Thanks
in advance.

EG.
Data set 1
ID Date Qty Total
1 1/12/05 5 1500
1 3/12/05 5 1500
2 2/12/05 10 2500

Data set 2
ID Date Total
1 3/12/05 (= formulae required to match both ID and date as
criteria.)

  #4   Report Post  
Posted to microsoft.public.excel.misc
Nav
 
Posts: n/a
Default Vlookup 2 data matches?

Thanks for the below, but do you know if this will work if the data are on
different worksheets?

"Domenic" wrote:

Assumptions:

A1:D1 contains your headers/labels

A2:D4 contains your data

Formula:

=INDEX($D$2:$D$4,MATCH(1,($A$2:$A$4=F2)*($B$2:$B$4 =G2),0))

....where F2 contains the ID of interest, and G2 contains the date of
interest.

Note that the formula needs to be confirmed with CONTROL+SHIFT+ENTER,
not just ENTER

Hope this helps!

In article ,
Nav wrote:

I have a list of data (2 sets) , I need the data to be picked up from from 1
set if the Customer ID and the Date of purchase match together. I am aware
VLOOKUP will match and lokkup if one of the sets of data agrees, but is it
possible to pick up the 4th column if the customer ID AND the date match from
the first data set to the second data set? Please can someone help. Thanks
in advance.

EG.
Data set 1
ID Date Qty Total
1 1/12/05 5 1500
1 3/12/05 5 1500
2 2/12/05 10 2500

Data set 2
ID Date Total
1 3/12/05 (= formulae required to match both ID and date as
criteria.)


  #5   Report Post  
Posted to microsoft.public.excel.misc
Nav
 
Posts: n/a
Default Vlookup 2 data matches?

Thanks, This works.

"duane" wrote:

you can do that with a sumproduct function - note you will get the sum of all
matches of the two criteria.

with your data in a2:d5 and desired id in a7, desired date in b7, this does
"lookup" on column C

=SUMPRODUCT((A2:A5=A7)*(B2:B5=B7)*(C2:C5))

"Nav" wrote:

I have a list of data (2 sets) , I need the data to be picked up from from 1
set if the Customer ID and the Date of purchase match together. I am aware
VLOOKUP will match and lokkup if one of the sets of data agrees, but is it
possible to pick up the 4th column if the customer ID AND the date match from
the first data set to the second data set? Please can someone help. Thanks
in advance.

EG.
Data set 1
ID Date Qty Total
1 1/12/05 5 1500
1 3/12/05 5 1500
2 2/12/05 10 2500

Data set 2
ID Date Total
1 3/12/05 (= formulae required to match both ID and date as
criteria.)



  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Vlookup 2 data matches?

You can use this kind of syntax:

=index(othersheet!$c$1:$c$100,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))
(one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

Nav wrote:

Thanks for the below, but do you know if this will work if the data are on
different worksheets?

"Domenic" wrote:

Assumptions:

A1:D1 contains your headers/labels

A2:D4 contains your data

Formula:

=INDEX($D$2:$D$4,MATCH(1,($A$2:$A$4=F2)*($B$2:$B$4 =G2),0))

....where F2 contains the ID of interest, and G2 contains the date of
interest.

Note that the formula needs to be confirmed with CONTROL+SHIFT+ENTER,
not just ENTER

Hope this helps!

In article ,
Nav wrote:

I have a list of data (2 sets) , I need the data to be picked up from from 1
set if the Customer ID and the Date of purchase match together. I am aware
VLOOKUP will match and lokkup if one of the sets of data agrees, but is it
possible to pick up the 4th column if the customer ID AND the date match from
the first data set to the second data set? Please can someone help. Thanks
in advance.

EG.
Data set 1
ID Date Qty Total
1 1/12/05 5 1500
1 3/12/05 5 1500
2 2/12/05 10 2500

Data set 2
ID Date Total
1 3/12/05 (= formulae required to match both ID and date as
criteria.)



--

Dave Peterson
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
data validation using vlookup cbra Excel Worksheet Functions 5 October 26th 05 12:24 PM
Vlookup for data contained in a cell Garbunkel Excel Worksheet Functions 5 September 14th 05 06:47 PM
VLOOKUP Function using Data Ranges. Cal Excel Worksheet Functions 6 April 16th 05 03:26 PM
Using VLOOKUP with multiple first column matches John Simons Excel Worksheet Functions 2 February 20th 05 01:27 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 09:05 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"