Return unique values based on two sets of criteria

chappers

New Member
Joined
Nov 2, 2016
Messages
8
I need a formula that looks up unique values on a separate sheet based on two value on another sheet. For example:

Sheet1:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Domain[/TD]
[TD]xyz.com[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Search term[/TD]
[TD]hello[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]xyz.com[/TD]
[TD]hello[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]xyz.com[/TD]
[TD]hello[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]abc.com[/TD]
[TD]hello[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]xyz.com[/TD]
[TD]goodbye[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]abc.com[/TD]
[TD]goodbye[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]def.com[/TD]
[TD]hello[/TD]
[/TR]
</tbody>[/TABLE]

So in the above example cell C2 in sheet1 would contain the formula and return the number of values matching B2 on sheet2 column B where B1 on sheet1 matches in column A on sheet2.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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