Conditional Formatting Working For Me - But Not My Coworker

larinda4

Board Regular
Joined
Nov 15, 2021
Messages
73
Office Version
  1. 365
Platform
  1. Windows
So I have a macro that I released to my coworker to use, however, the conditional formatting won't highlight for her. If I run the macro on my computer, the highlighting works. The conditional formatting is only on one sheet and the formula does not reference another sheet. I don't know if that's important to know or not.

We both have the same version of excel. Does anyone have any idea why the conditional formatting won't work for her? Is there something I'm missing? I tried googling it and I found one instance but it didn't have a solution.

Anyone have any ideas?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You mentioned a "macro".
Is this vital to the Conditional Formatting?
Is her computer set up to allow macros to run on it?
 
Upvote 0
You mentioned a "macro".
Is this vital to the Conditional Formatting?
Is her computer set up to allow macros to run on it?
Hey again Joe! Thanks as always for your help.

The macro is most certainly vital to the conditional formatting. Her computer is set up for macros. Everything else works in the macro for her except the conditional formatting.

I'll paste the conditional formatting part of the macro below. It definitely works and I'm just baffled as to why it won't work for her.

Here's the code:
VBA Code:
'Define Ranges
Dim CombinedRangeClaims As Range
Dim HealthRangeClaims As Range
Dim DentalRangeClaims As Range
Dim CombinedRangeDeposits As Range
Dim HealthRangeDeposits As Range
Dim DentalRangeDeposits As Range
    
'Set Ranges
Set CombinedRangeClaims = Range("U" & FirstRow3 & ":Y" & CFICombTotal & " ")
Set HealthRangeClaims = Range("U" & FirstRow & ":Y" & CFIHealthTotal & " ")
Set DentalRangeClaims = Range("U" & FirstRow2 & ":Y" & CFIDentalTotal & " ")
Set CombinedRangeDeposits = Range("P" & FirstRow3 & ":S" & CFICombTotal & " ")
Set HealthRangeDeposits = Range("P" & FirstRow & ":S" & CFIHealthTotal & " ")
Set DentalRangeDeposits = Range("P" & FirstRow2 & ":S" & CFIDentalTotal & " ")

'Delete Existing Conditional Formatting from Range
CombinedRangeClaims.FormatConditions.Delete
HealthRangeClaims.FormatConditions.Delete
DentalRangeClaims.FormatConditions.Delete
CombinedRangeDeposits.FormatConditions.Delete
HealthRangeDeposits.FormatConditions.Delete
DentalRangeDeposits.FormatConditions.Delete

'Apply Conditional Formatting
CombinedRangeClaims.FormatConditions.Add Type:=xlExpression, Formula1:="=ROUND(U" & FirstRow3 & ",2)<>ROUND(G" & FirstRow3 & ",2)"
HealthRangeClaims.FormatConditions.Add Type:=xlExpression, Formula1:="=ROUND(U" & FirstRow & ",2)<>ROUND(G" & FirstRow & ",2)"
DentalRangeClaims.FormatConditions.Add Type:=xlExpression, Formula1:="=ROUND(U" & FirstRow2 & ",2)<>ROUND(G" & FirstRow2 & ",2)"
CombinedRangeDeposits.FormatConditions.Add Type:=xlExpression, Formula1:="=ROUND(P" & FirstRow3 & ",2)<>ROUND(B" & FirstRow3 & ",2)"
HealthRangeDeposits.FormatConditions.Add Type:=xlExpression, Formula1:="=ROUND(P" & FirstRow & ",2)<>ROUND(B" & FirstRow & ",2)"
DentalRangeDeposits.FormatConditions.Add Type:=xlExpression, Formula1:="=ROUND(P" & FirstRow2 & ",2)<>ROUND(B" & FirstRow2 & ",2)"

'Set interior color to yellow
CombinedRangeClaims.FormatConditions(1).Interior.Color = RGB(255, 255, 102)
HealthRangeClaims.FormatConditions(1).Interior.Color = RGB(255, 255, 102)
DentalRangeClaims.FormatConditions(1).Interior.Color = RGB(255, 255, 102)
CombinedRangeDeposits.FormatConditions(1).Interior.Color = RGB(255, 255, 102)
HealthRangeDeposits.FormatConditions(1).Interior.Color = RGB(255, 255, 102)
DentalRangeDeposits.FormatConditions(1).Interior.Color = RGB(255, 255, 102)
 
Upvote 0
Is she using the exact same file as you?
Is the VBA already there, or is she copy/pasting it into her workbook?
Make sure she is putting it in the correct module, if she is.

The surest test would be for you to send her along your "ready-made" file, and have her try running that.

Note that the code you posted seem incomplete too, as it does not show how values like FirstRow3 and CFICombTotal are calculated.
I can only assume that they are, in fact, calculated somewhere earlier in the code.
 
Upvote 0
Is she using the exact same file as you?
Is the VBA already there, or is she copy/pasting it into her workbook?
Make sure she is putting it in the correct module, if she is.

The surest test would be for you to send her along your "ready-made" file, and have her try running that.

Note that the code you posted seem incomplete too, as it does not show how values like FirstRow3 and CFICombTotal are calculated.
I can only assume that they are, in fact, calculated somewhere earlier in the code.
Hey Joe,

Yes, she's using the exact same file as me. Currently, I'll run the macro for her so the conditional format works and then she'll open it up and take it from there. Ideally I'd like her to be able to use the macro herself.

I sent her my VBA code through a note file and she has set it up in her PERSONAL.XLSB like I have in mine. Is there a "correct" module to put it in? I renamed my module. I wouldn't have thought placing it in a different module would have an impact. I'll look into which module she's placed it in though.

Yes, I do have the FirstRow3 and CFICombTotal referenced earlier in my code. My bad.
 
Upvote 0
Have her try putting it into a new module right in the workbook you are trying to run it in, and see if that works.
Here is a link that shows you how to insert a new VBA module in a workbook.
 
Upvote 0
Just wanted to put the solution in here in case someone else is having this problem.

It was because her Excel was in French. We updated the code so the formula in the conditional format was in French instead of English and voila! It worked!
 
Upvote 0
Solution
Very interesting.
Thanks for reporting back and letting us know what the problem was!
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,177
Members
449,368
Latest member
JayHo

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