Matching Criteria across Multiple Columns

XJ8000

New Member
Joined
Dec 12, 2018
Messages
2
Please help, I'm trying to work an excel formula in order to report on a table of data.

I’d like to return a "Yes" when unique entries in column A, when the corresponding range of entries in column B are unique. The data set is:

Table1
Column A
Column B
A
20
A
20
B
30
B
2
C
40
C
40
C
40
D
30

<tbody>
</tbody>



The formula in Table 2 in Column B2 is

'=IF(AND(EXACT(INDEX(Table1!A:B,MATCH(A2,Table1!A:A,0),2),Table1!B:B))=TRUE,"YES","No")'

and the formula in B3 is

'=IF(AND(EXACT(INDEX(Table1!A:B,MATCH(A3,Table1!A:A,0),2),Table1!B:B))=TRUE,"YES","No")' etc etc.

The output in Column 2 is as follows:

Table2
Column A
Column B
A
YES
B
YES
C
YES
D
No

<tbody>
</tbody>


When in fact the output should read:

Column A
Column B
A
YES
B
No
C
YES
D
YES

<tbody>
</tbody>


Many Thanks
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi

a possible approach in B3, array entered (control+shift+enter)


=IF(SUM(IF(FREQUENCY(IF('Table 1'!A$2:A$100=A3,MATCH("~"&'Table 1'!B$2:B$100,'Table 1'!B$2:B$100&"",0)),ROW($3:$100)-ROW($A$2)+1),1))-1;"No","Yes")

Regards
 
Upvote 0
Thank you - that is great - had to make a slight mod to formula but otherwise perfect and much appreaciated - in B3 the formula is:

=IF(SUM(IF(FREQUENCY(IF(Table1!A$2:A$101=A3,MATCH("~"&Table1!B$2:B$101,Table1!B$2:B$101&"",0)),ROW(Table1!$2:$101)-ROW($A3)+1),1))-1,"No","Yes")
 
Upvote 0
Hi,

Here's a Non-Array entered formula option, change/adjust cell references/range and add sheet names as needed:


Book1
ABCDE
1A20AYES
2A20BNO
3B30CYES
4B2DYES
5C40
6C40
7C40
8D30
Sheet389
Cell Formulas
RangeFormula
E1=IF(COUNTIF(A$1:A$8,D1)=COUNTIFS(A$1:A$8,D1,B$1:B$8,VLOOKUP(D1,A$1:B$8,2,0)),"YES","NO")
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,720
Members
448,986
Latest member
andreguerra

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