When I have a Tie and the same number is referenced is there a way to change the color to RED?

RudeBoy

Active Member
Joined
Feb 2, 2003
Messages
364
When I have a Tie and the same number is referenced is there a way to change the color to RED?
See below an example we had a tie 2477 sometimes we have multiple ties so wanted to know if I have a tie how can I have the tie number be turned to RED.

Example so If I have three people tied at 2477 then I would want to turn those ties number 2477 turned to RED. Thanks for your help


TEAM EVENT20th PlaceTEAM EVENT20th Place
I GOT ONE
2477​
Ain't Got No Haters
2477​
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,526
Office Version
  1. 365
Platform
  1. Windows
Try changing
VBA Code:
Worksheets("Sheet3").Activate
to
VBA Code:
Sheet3.Activate
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

RudeBoy

Active Member
Joined
Feb 2, 2003
Messages
364
Try changing
VBA Code:
Worksheets("Sheet3").Activate
to
VBA Code:
Sheet3.Activate
I got this error - See picture attached
 

Attachments

  • err.jpg
    err.jpg
    134.1 KB · Views: 3

RudeBoy

Active Member
Joined
Feb 2, 2003
Messages
364
Remove the word "worksheets"
Ok I removed that and it saved it but how do I get it to execute on the sheet3?
Maybe my excel format is wrong? do I need to save as a .xlsm or something? I currently have it saved as a .xls

Let me know thanks stay safe
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
1,732
Office Version
  1. 365
  2. 2010

ADVERTISEMENT

Yes, definitely an xlsm because the "m" stands for "macro" which you have in the workbook.
 

RudeBoy

Active Member
Joined
Feb 2, 2003
Messages
364
Yes, definitely an xlsm because the "m" stands for "macro" which you have in the workbook.
Looks like I can view code & go to ThisWorkbook and run/sub it and your code runs.
But when a change is made and the ties are not there then the cells that had originally been flagged as dupes stayed highlighted even after I ran the VBA?

If the Tie is gone the cell should reset to no highlight when I run the code.

I attached pic to show the tie gone but fields still highlighted after running vba
 

Attachments

  • VBA.JPG
    VBA.JPG
    11.9 KB · Views: 1

kweaver

Well-known Member
Joined
May 8, 2018
Messages
1,732
Office Version
  1. 365
  2. 2010
Put this line after the Worksheets("Sheet3").Activate :

Sheet3.Cells.Interior.Color = xlNone
 

Watch MrExcel Video

Forum statistics

Threads
1,129,472
Messages
5,636,516
Members
416,922
Latest member
defectexpress

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
Top