Conditional Formatting Lost in Excel Table Resize

robtperk

New Member
Joined
Nov 15, 2012
Messages
6
I have created tables in a workbook which adjust in number of rows based on the number of months that need to be represented. The start and finish date are contained in cells and the adjustment macro runs from a command button using the code snippet below:

Code:
 If ActiveSheet.ListObjects.Count > 0 Then
     For Each oLst In ActiveSheet.ListObjects
         oLst.ListRows(oLst.ListRows.Count).Delete
         Next oLst
 End If

The code works great to resize the tables, but the tables loose all but one of the conditional formatting rules I set-up. This wouldn't happen with ranges, but I loose the capabilities to fairly easily resize the tables with code and have the formulas populate correctly.

I know there are some Excel Geniuses out there who can help me.
clear.png

 

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