Forumula to return value if cells in range are the same

Jamidd123

New Member
Joined
Nov 16, 2018
Messages
2
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A1
[/TD]
[TD]A2
[/TD]
[TD]A3
[/TD]
[TD]A4
[/TD]
[/TR]
[TR]
[TD]EL1
[/TD]
[TD]EL1
[/TD]
[TD]EL1
[/TD]
[TD]EL1
[/TD]
[/TR]
</tbody>[/TABLE]
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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,224,829
Messages
6,181,222
Members
453,024
Latest member
Wingit77

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