Vlookup using two criteria

NYEXCEL1

Board Regular
Joined
Apr 17, 2013
Messages
123
I have two tables of data as shown below. Since combining as one pivot table is not working, i would like to add a vlookup column on the second table that pulls the revenue number. It seems like the function will have to include both the customer and the period in order to pull the correct revenue number. Please advise and thank you!
CustomerPeriodRevenue
Client A201301100
Client B20130250

<tbody>
</tbody>

CustomerPeriodHoursTime Cost
Client A20130110300
Client A2013025150
Client B 2013036200

<tbody>
</tbody>
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I see the customer and the period columns in the data set, but where is the revenue? all I see is "time cost" and "Hours"
 
Upvote 0
The revenue is in the first table. I need to match the client and period in table 2 with the revenue in table one
 
Upvote 0
use SUMPRODUCT

=SUMPRODUCT(--(TABLE!$A$1:$A$500=A1),--(TABLE!B$1:B$500=B1),(TABLE!C$1:C$500))

Where the data to be looked up is in worksheet named TABLE

in summary worksheet A1 and B1 contain criteria to match up

edited - original had error
 
Last edited:
Upvote 0
Forumla is not working. Should there be a ")" after the second array? and why is the third array not referencing the table?
 
Upvote 0
yes, please note that I edited my formula... my original had an error, sorry about that

here is a sreenshot with same formula

ScreenShot1238.gif
 
Last edited:
Upvote 0
thanks... i am getting a value# error and not sure why. here is my formula..

=SUMPRODUCT(--(Sheet7!$B$1:$B$550=A3),--(Sheet7!$A$1:$A$550=D3),--Sheet7!$C$1:$C$550)
 
Upvote 0
=sumproduct(--($b$1:$b$550=a3),--($a$1:$a$550=d3),($c$1:$c$550))
try to take the -- out of the 3rd array and take the sheet names out too
 
Upvote 0
ok, i will try that...but why take out the sheet names? the data are in two seperate worksheets.
 
Upvote 0

Forum statistics

Threads
1,203,075
Messages
6,053,391
Members
444,661
Latest member
liamoohay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top