Return Criteria If all Cells Match

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am looking for a formula to look through P25:P70 and make sure they are all the same alpha numeric entry

ie
If all entries are ABC123 then return ABC123 if there is one or more anomalies then return "mismatch"

Many thanks for any help
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Here is one way:
Code:
=IF(COUNTIF(P25:P70,P25)=46,P25,"mismatch")
 
Upvote 0
Beaten 2 it
 
Last edited:
Upvote 0
Aplogies herebut could I raise another issue I am having with alpha numeric values

=IFERROR(INDEX(Maintenance!$D$9:$D$2000,MATCH(C27,Maintenance!$C$9:$C$2000,0),0),"")

this returns perfectly well any alpha numeric values but wont return just numbers?

Any ideas why this is?

Thanks
 
Upvote 0
Aplogies herebut could I raise another issue I am having with alpha numeric values

=IFERROR(INDEX(Maintenance!$D$9:$D$2000,MATCH(C27,Maintenance!$C$9:$C$2000,0),0),"")

this returns perfectly well any alpha numeric values but wont return just numbers?
That is a totally different unrelated question, and therefore should be posted in its own new thread.
 
Upvote 0
Hi Joe4,

Sorry and my apologies

Just one thing I have found with your solution to my original question

if there are any blanks at the end of the range it will show the mismatch return, can the formula ignore blanks?

Thanks again
 
Upvote 0
Try this:
Code:
=IF(COUNTIF(P25:P70,P25)=46-COUNTBLANK(P25:P70),P25,"mismatch")
 
Upvote 0
Works perfect, many thanks Joe4

(Sorry for the late reply)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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