highlighting if specific number appears multiple times

Rachy_bo

New Member
Joined
Sep 28, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi guys,
very new to excel!
I was wondering if there is a formula you can use to highlight if a specific word or number is repeated over a certain amount of times e.g. I want to highlight the cells that contain the number 19 only if it has appeared in the whole spreadsheet 3 times
basically there is only so many 19's that can be given out so if its typed in again it needs to flag up as red or with a warning of some kind,

thanks
rach
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the Board!

You can use Conditional Formatting to do this.
Let's say that you wanted to check the range A1:Z100.
Then, you could select than range and apply this Conditional Formatting formula to it:
Excel Formula:
=AND(A1=19,COUNTIF($A$1:$Z$100,19)=3)
and choose your desired formatting color.
 
Upvote 0
Solution
Welcome to the Board!

You can use Conditional Formatting to do this.
Let's say that you wanted to check the range A1:Z100.
Then, you could select than range and apply this Conditional Formatting formula to it:
Excel Formula:
=AND(A1=19,COUNTIF($A$1:$Z$100,19)=3)
and choose your desired formatting color.
Hi!
thankyou so much but i tried the code except I tried it with a date ''19.10.21'' and it didn't highlight anything, maybe i put it in wrong?
I put =AND(A1="19.10.21",COUNTIF($A$1:$Z$200,"19.10.21")=3)

Thanks
rach
 
Upvote 0
Is "19.10.21" a string, or is it a formatted date?
Does it appear EXACTLY 3 times in your range?
Did you select that exact range ($A$1:$Z$200) before applying the Conditional Formatting?
 
Upvote 0
Is "19.10.21" a string, or is it a formatted date?
Does it appear EXACTLY 3 times in your range?
Did you select that exact range ($A$1:$Z$200) before applying the Conditional Formatting?
You're a genius Joe,
i just figured out there was more than 3 of the same date so i just switched it to >3 in the formula
you are a lifesaver!
thankyou so much!
 
Upvote 0
You are welcome.

I originally had it as ">=3", but I re-read your question, and it looks like you were asking for exactly 3, so I changed it.
 
Upvote 0
You are welcome.

I originally had it as ">=3", but I re-read your question, and it looks like you were asking for exactly 3, so I changed it.
I'm too new to this, i felt proud just by figuring out how to highlight cells with certain words in, so I need to go lie down after this :D
I would of never of thought of that formula, so you've made my life so much easier!
thankyou!
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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