How to see if all text in each column match each other but do not take blanks into consideration

alethea2022

New Member
Joined
Dec 7, 2022
Messages
11
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
1688047778164.png


i would like a formula in column g that i can autofilter down that says if a1, b1, c1, d1, e1, f1 are the same as each other let me know in some way.

I have used the and if feature but because there are some cells with blank data it classes this as not a match and i want them to be a match. row 2 would of cause be a no match thank you
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
In G1 and copy down

Excel Formula:
=IF(COUNTIF(A1:F1,A1)=COUNTA(A1:F1),"Equals","Not")
 
Upvote 0
Are the blanks always at the end, like you show in row 1, or could they be interspersed?
If column A will ALWAYS have data, then Dante's formula should work.
If, for any row, column A may be blank while other columns have data, that formula will need some editing.
 
Upvote 0
As Joe4 mentioned, you may have to use this formula for all possible outcomes:
Excel Formula:
=IF(COUNTIF(A1:F1,A1)=COUNTA(A1:F1),"Equals",IF(COUNTIF(B1:F1,B1)=COUNTA(B1:F1),"Equals",IF(COUNTIF(C1:F1,C1)=COUNTA(C1:F1),"Equals",IF(COUNTIF(D1:F1,D1)=COUNTA(D1:F1),"Equals",IF(COUNTIF(E1:F1,E1)=COUNTA(E1:F1),"Equals",IF(COUNTIF(F1:F1,F1)=COUNTA(F1:F1),"Equals","Not"))))))
 
Upvote 0
As Joe4 mentioned, you may have to use this formula for all possible outcomes:
Excel Formula:
=IF(COUNTIF(A1:F1,A1)=COUNTA(A1:F1),"Equals",IF(COUNTIF(B1:F1,B1)=COUNTA(B1:F1),"Equals",IF(COUNTIF(C1:F1,C1)=COUNTA(C1:F1),"Equals",IF(COUNTIF(D1:F1,D1)=COUNTA(D1:F1),"Equals",IF(COUNTIF(E1:F1,E1)=COUNTA(E1:F1),"Equals",IF(COUNTIF(F1:F1,F1)=COUNTA(F1:F1),"Equals","Not"))))))
That does not seem to work.
It seems to return "EQUALS" for me in ALL instances, regardless of data content. Issues are highlighted in yellow:
1688049201826.png
 
Upvote 0
Here is a variation of Dante's original formula that addresses the example I show on row 2 of my last post:
Excel Formula:
=IF(COUNTIF(A1:F1,XLOOKUP(TRUE,NOT(ISBLANK(A1:F1)),A1:F1))=COUNTA(A1:F1),"Equals","Not")
 
Upvote 0
If, for any row, column A may be blank while other columns have data, that formula will need some editing.
Try:

Excel Formula:
=LET(a,A2:F2,SI(COUNTA(a)=COUNTIF(a,INDEX(a,,LARGE((a<>"")*COLUMN(a),1))),"Equals","Not"))
 
Upvote 0
=LET(a,A2:F2,SI(COUNTA(a)=COUNTIF(a,INDEX(a,,LARGE((a<>"")*COLUMN(a),1))),"Equals","Not"))
I think that "SI" needs to be converted to an "IF" for non-Spanish users of Excel.
When I made that change, it works as expected.
 
Upvote 0
aggghhh my translation :mad:

Sorry about that, here is my formula with the correct translation. Thanks Joe

VBA Code:
=LET(a,A2:F2,IF(COUNTA(a)=COUNTIF(a,INDEX(a,,LARGE((a<>"")*COLUMN(a),1))),"Equals","Not"))
 
Upvote 0
Here another way:

Excel Formula:
=IF(COUNTA(UNIQUE(FILTER(A1:F1,A1:F1<>""),TRUE))=1,"Equals","Not")
 
Upvote 0

Forum statistics

Threads
1,223,732
Messages
6,174,182
Members
452,550
Latest member
southernsquid2

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