Vlookup with multiple conditons

petrcz

New Member
Joined
Mar 25, 2016
Messages
31
Hello,

could you please help me with the task below?
I need to find out, how much money is spent on advertising for specific landing page.
So, in first row column D of table1, there should be a value $10,50
In row 4, column d of table 1, there should be a value $15,00

The logic is this: if there is a value "cpc" in column A of table2 and if there is a value "google" in column B of table2 and the landing page in column C of table2 match with the landing page in column C of table 1, then put this value (column D of table2) to this cell..

table1

[TABLE="class: grid, width: 261"]
<tbody>[TR]
[TD]Medium[/TD]
[TD]Source[/TD]
[TD]LandinPage[/TD]
[/TR]
[TR]
[TD]cpc[/TD]
[TD]google[/TD]
[TD]/landing-page-1[/TD]
[/TR]
[TR]
[TD]cpc[/TD]
[TD]bing[/TD]
[TD]/landing-page-1[/TD]
[/TR]
[TR]
[TD]organic[/TD]
[TD]google[/TD]
[TD]/landing-page-1[/TD]
[/TR]
[TR]
[TD]cpc[/TD]
[TD]google[/TD]
[TD]/landing-page-2[/TD]
[/TR]
[TR]
[TD](none)[/TD]
[TD]direct[/TD]
[TD]/landing-page-3[/TD]
[/TR]
</tbody>[/TABLE]

table2
[TABLE="class: grid, width: 292"]
<tbody>[TR]
[TD]Medium[/TD]
[TD]Source[/TD]
[TD]LandingPage[/TD]
[TD]Cost[/TD]
[/TR]
[TR]
[TD]cpc[/TD]
[TD]google[/TD]
[TD]/landing-page-1[/TD]
[TD] $ 10,50[/TD]
[/TR]
[TR]
[TD]cpc[/TD]
[TD]bing[/TD]
[TD]/landing-page-2[/TD]
[TD] $ 11,00[/TD]
[/TR]
[TR]
[TD]cpc[/TD]
[TD]google[/TD]
[TD]/landing-page-2[/TD]
[TD] $ 15,00[/TD]
[/TR]
</tbody>[/TABLE]

Thank you very much in advance for your assistance
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,

If the both tables are in same sheet you can use the below formula

=IF(OR(A3=A11,B3=B11,C3=C11),D11,"NA")

The cell numbers can vary, u can choose wherever the values are.

If the table 2 in some other sheet you can use below formula

=IF(OR(A3=Sheet2!A2,B3=Sheet2!B2,C3=Sheet2!C2),Sheet2!D2,"NA")

Sheet number can be vary.
 
Upvote 0
A:C of Sheet1 houses table1; A:D of Sheet2 houses table2.

In D2 of Sheet1 control+shift+enter, not just enter:

=IFERROR(INDEX(Sheet2!$D$2:$D$4,MATCH($C2,IF(Sheet2!$A$2:$A$4=$A2,IF(Sheet2!$B$2:$B$4=$B2,Sheet2!$C$2:$C$4)),0)),"not found")
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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