Find formatted cells and add row under each instance

LoriD

Board Regular
Joined
Apr 1, 2002
Messages
143
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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,279
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
143
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,181,450
Messages
5,929,984
Members
436,713
Latest member
arnold_fok

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