Find formatted cells and add row under each instance

LoriD

Board Regular
Joined
Apr 1, 2002
Messages
141
I have a sheet that I have used conditional formatting to highlight cells that meet a criteria. Can Excel find the formatted cells and add a blank row under it?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,257
Yes that can be done, using VBA. In general terms, the code would not look for the formatting, but rather the reason for the formatting (the condition itself). Where the condition is found, a new row would be inserted.

If you post your condition, and the range in your spreadsheet where the condition is being applied, then chances are that someone here can help you get the result you are looking for.
 

LoriD

Board Regular
Joined
Apr 1, 2002
Messages
141
I have a dynamic range, columns A:J. I have recorded a macro and copied it into the worksheet change event that goes each time to the range, and applies the formatting. (I don't know if that's really smart, I'm open to suggestions.)

The condition is in column J, where I have this formula: =ISODD(COUNTIF($I$2:I7,1))
It is set up to format rows where this condition returns TRUE.

Any takers?? Thanks in advance.
 

Forum statistics

Threads
1,144,150
Messages
5,722,796
Members
422,459
Latest member
Chriselff

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