Forumula to return value if cells in range are the same

Jamidd123

New Member
Joined
Nov 16, 2018
Messages
2
A1
A2
A3
A4
EL1
EL1
EL1
EL1

<tbody>
</tbody>
Hi Mrexcel Forum,

I am trying to work out a formula that looks in a range to see if all cells in that range are the same and if they are then I would like the formula to return the value that is the in the range.

Example:
Please see table above I would like the formula in A4 and the range to be A1 to A3. (for some reason I could not get the table at the bottom of my post!!)

Thank you in advance

Jamidd
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi & welcome to MrExcel.
How about
=IF(COUNTIF(A1:A3,A1)=3,A1,"")
 
Upvote 0
Thank you for your quick response!
That works treat! I managed to get to the point where it would say TRUE! Your a DIAMOND!

Would there be anyway to add if value is say x across all three then leave blank?

Thank you again!
 
Upvote 0
How about
=IF(COUNTIF(A1:A3,"x")=3,"",IF(COUNTIF(A1:A3,A1)=3,TRUE))
Change the "x" to whatever value you want
 
Upvote 0

Forum statistics

Threads
1,215,947
Messages
6,127,867
Members
449,410
Latest member
adunn_23

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