Odd Matching Question

seguin85

Active Member
Joined
Mar 17, 2015
Messages
278
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have some data setup similar to this:

CustomerRegionProgramUnique ProgramEuropeChinaNorth AmericaSouth America
A1EuropeX11yes-yes-
A1North AmericaX10----
A1EuropeX51yesyesyesyes
A1ChinaX50----
A1North AmericaX50----
A1South AmericaX50----

<tbody>
</tbody>

Customer, Region and Program are all from a data source and can't be altered. I added the unique program to identify if the program is unique and it works like it should.

What I need it on the unique program row is to identify if that program is in that particular country.

Any ideas?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Perhaps:

ABCDEFGH
1CustomerRegionProgramUnique ProgramEuropeChinaNorth AmericaSouth America
2A1EuropeX11Yes-Yes-
3A1North AmericaX10----
4A1EuropeX51YesYesYesYes
5A1ChinaX50----
6A1North AmericaX50----
7A1South AmericaX50----

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet5

Worksheet Formulas
CellFormula
E2=IF(COUNTIFS($C:$C,$C2,$B:$B,E$1)*$D2,"Yes","-")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Book1
ABCDEFGH
1CustomerRegionProgramUnique ProgramEuropeChinaNorth AmericaSouth America
2A1EuropeX11yes
3A1North AmericaX10
4A1EuropeX51
5A1ChinaX50
6A1North AmericaX50
7A1South AmericaX50
Sheet2
Cell Formulas
RangeFormula
E2=IF(IF($D2=1,SUMPRODUCT(--($B$2:$B$7=E$1),--($C$2:$C$7=$C2)),0)=1,"yes","-")


Try this. Copy formula down and right.
 
Upvote 0
Assuming table starts in A1, putting the following formula in D2 and dragging down will give TRUEs and FALSEs (TRUE if there is a yes in the country column that matches the region
=INDEX(E2:H2,MATCH(B2,$E$1:$H$1,0))="yes"

if you want 1s and 0s use
=1*(INDEX(E2:H2,MATCH(B2,$E$1:$H$1,0))="yes")
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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