conditionalk format to highlight duplicate numbers only

still learning

Well-known Member
Joined
Jan 15, 2010
Messages
784
Office Version
  1. 365
Platform
  1. Windows
Hi
Row B has both text and numbers.
When I highlight B row, and use conditional format to change the font color of any duplicate values, it highlights text and numbers.
How do I only highlight numbers.

I don't care if the text is a duplicate. I'm only concerned with the numbers.


mike
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Are you asking that if a cell contains say "AA123", and it is a duplicate in another cell that you only want to highlight the 123 portion of that cell?

If that is the case you are unable to do that with Conditional Formatting (CF).

If you are asking something else please restate your question.
 
Upvote 0
hi philwojo

Some cells in row B have only a text
Some cells in row B have only a number
I don't want to duplicate any number in the row
I don't care if any of the text is duplicated
Example

B1..abc
B2..def
B3..abc
B4..abc
B5..123
B6..def
B7..def
B8..123

since B8 has the same number as a cell above I want to highlight it. to show me its a duplicate number. i will then know i made an error that the number is wrong.

I'm only concerned with numbers.

mike
 
Upvote 0
Try this added as a new CF formula, first highlight the range of values you want to check, then add the new rule as a formula.

Code:
=IF(ISNUMBER($B1),IF(COUNTIF($B$1:$B$8,$B1)>1,TRUE,FALSE))

You will need to update the $b$1:$b$8 portion to reflect your actual full range.
 
Upvote 0
try this as a conditional formatting formula in cell B1 and copy the formatting down. It will highlight the second or subsequent occurrences of a number: =AND(ISNUMBER(B1),COUNTIF($B$1:$B1,B1)>1)

Hope that helps.

Regards
 
Upvote 0
Thank you philwojo:

Your formula works great. It highlights both duplicate numbers

Thank you pjmorris:

Your formula also works great

again thanks


mike
 
Upvote 0
delighted to have helped and thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,592
Members
449,089
Latest member
Motoracer88

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