Check and apply Conditional Formatting for dynamically (vba) changed fields

coguci

New Member
Joined
May 3, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi experts,

I have a sheet with conditional formatting (color for a status value) for a specific row. Sometimes I set the values of a cell of this row manually. The condition is checked and the format is applied.
Sometimes I change the status value via vba but the format is NOT applied. Only when I enter the cell afterwards via double click and press enter the format will be applied.
How can I make excel check and apply the conditional format via vba? Is there any command?

Oh, I already tried such things like Range.Select, Range.Activate... but didn't work.

Thanks,
Sebastian
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,332
Office Version
  1. 365
Platform
  1. Windows
Welcome to the Board!

Please please some sample data, your Conditional Formatting rule, and your VBA code.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 

coguci

New Member
Joined
May 3, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi Joe! I'm working on a business notebook and don't have permission to install anything on it. But I'll ask our IT to install the add-on.
Meanwhile, I found the error origin. The format hasn't been updating because of another error which terminated the vba-processing but I haven't implemented an error handling there. So, now it works!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,332
Office Version
  1. 365
Platform
  1. Windows
I am glad you figured it out.

For future reference, note that if you cannot install that Add-In, you can copy/paste images of your data, so we can at least see what it looks like.
You can also post VBA code using the Code Tags (see: How to Post Your VBA Code).
The key is, you want to post enough information for us so we can help you diagnose your problem.
It can be hard to figure out what the issues may be with vague posts that do not include any detail.
 

Forum statistics

Threads
1,136,732
Messages
5,677,432
Members
419,692
Latest member
Also_Confused

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