Finding all matches across 4 columns

Nathan Asius

New Member
Joined
Jan 15, 2024
Messages
41
Office Version
  1. 365
Platform
  1. Windows
I have a simple but large worksheet of over 30,000 rows containing sentences and quotations etc... of various things said or written throughout history.
I have four columns that count total words, total letters, vowels, and consonants (not counting for punctuation or spaces).
I need a formula to look at the results across each of four columns, and find exact matches.
So for instance, if
B2 = 9
C2= 36
D2 =24
E2 =12
then I would like the formula to look through the same columns down all 30,000+ rows, and find if there are the same four matches, whether there's only 2, or up to any number of matches.
But I would like to do this for every possible match of any and all combinations across those 4 columns through all rows.

I don't even know which function to begin this task with.

For this sheet, I am using Excel for Mac 2019.
 

Attachments

  • Screen Shot 2024-04-24 at 2.53.29 PM.png
    Screen Shot 2024-04-24 at 2.53.29 PM.png
    133.8 KB · Views: 28
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I freeformed this, so may need to debug any typos:
I'm unsure where your formula belongs though, you may get circular references with this.

Excel Formula:
=Let(data,$B$2:$E$30000,clm01,ChooseCols(data,1),clm02,ChooseCols(data,2),clm03,ChooseCols(data,3),clm04,ChooseCols(data,4),
ROWS(Filter(data,(clm01=$B2)*(clm02=$C2)*(clm03=$D2)*(clm=$D2),"")))
 
Upvote 0
I attempted your formula awoohaw, but the FILTER function does not work in Excel for Mac 2019. I would suspect that LET also doesn't work either.
I freeformed this, so may need to debug any typos:
I'm unsure where your formula belongs though, you may get circular references with this.

Excel Formula:
=Let(data,$B$2:$E$30000,clm01,ChooseCols(data,1),clm02,ChooseCols(data,2),clm03,ChooseCols(data,3),clm04,ChooseCols(data,4),
ROWS(Filter(data,(clm01=$B2)*(clm02=$C2)*(clm03=$D2)*(clm=$D2),"")))
tt
 
Upvote 0
I attempted your formula awoohaw, but the FILTER function does not work in Excel for Mac 2019. I would suspect that LET also doesn't work either.

tt
your profile says you use 365, i missed the last sentence of your post.

But, please tell me what cell (and worksheet if it is a different sheet) do you want the formula in?
And also, when you say different combinations of those four columns, what do you mean? Some examples would be very helpful.

this is something, but i'm not sure it is what your really seek:

Book1
ABCDEFG
1
2text 293624122
3text 37164233
4text 451134281
5text 54193571
6text 67164233
7text 7113610181
8text 8181726291
9text 924154181
10text 1032512191
11text 1193624122
12text 12142830311
13text 1335354341
14text 1418162741
15text 1516226151
16text 162310461
Sheet1
Cell Formulas
RangeFormula
G2:G16G2=SUMPRODUCT((B2=$B$2:$B$17)*(C2=$C$2:$C$17)*(D2=$D$2:$D$17)*(E2=$E$2:$E$17))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,210
Members
453,023
Latest member
alabaz

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