Table query refresh resets Conditional formatting

dotsent

Board Regular
Joined
Feb 28, 2016
Messages
89
Office Version
  1. 365
Platform
  1. Windows
Guys, I'm struggling with Conditional formatting in a table generated by PowerQuery. Formatting changes entire row cell color based on text in column H - in addition there's a separate Duplicate value formatting for column D exclusively. So, obviously they intersect with each other and I need to set a priority. Both work individually but I need the duplicate value formatting to have the highest priority.

Once I use the priority-changing buttons and move the Duplicate-value formatting to the 1st position, it works great. However the table is scheduled to refresh automatically and once there are changes to the table, conditional formatting priorities are reset back to the status seen on the screenshot below. Given the refresh function works over VBA, I thought I'll just add some dirty fix for that via VBA and this code would indeed raise the priority as expected:

VBA Code:
ActiveSheet.Range("myTable[SN]").FormatConditions.Item(4).Priority = 1

But then I realized Conditional formatting priority is reset only in case the refresh process does some actual changes to the table (not always the case). Might someone have any bright ideas? VBA fix would be OK in this case too, although I have to imagine that sort of thing should be somehow possible by proper table setup...

conditionalformatting.jpg
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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