Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Conditional Formatting - Inserting Rows
Hi,
Is there a way that when you insert rows, the conditional formatting on the adjacent rows does not copy into the inserted/new row? Thanks, |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Conditional Formatting - Inserting Rows
Here are tow ways of inserting a row when the text changes in Column A (I
don't know why you are inserting rows). Sub InsertRow_At_Change() Dim LastRow As Long Dim x As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False For x = LastRow To 3 Step -1 If Cells(x, 1).Value < Cells(x - 1, 1).Value Then If Cells(x, 1).Value < "" Then If Cells(x - 1, 1).Value < "" Then Cells(x, 1).EntireRow.Insert Shift:=xlDown End If End If End If Next x Application.ScreenUpdating = True End Sub Sub InsertAfterTextChange() Do Until ActiveCell = Empty And ActiveCell.Offset(1) = Empty If ActiveCell < ActiveCell.Offset(1) And ActiveCell < Empty And ActiveCell.Offset(1) < Empty Then ActiveCell.Offset(1).EntireRow.Insert ActiveCell.Offset(2).Select Else ActiveCell.Offset(1).Select End If Loop End Sub -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Danny" wrote: Hi, Is there a way that when you insert rows, the conditional formatting on the adjacent rows does not copy into the inserted/new row? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Condtional Formatting - Inserting Rows | Excel Worksheet Functions | |||
Inserting a new column affects conditional formatting | New Users to Excel | |||
Conditional formatting rows | Excel Discussion (Misc queries) | |||
Conditional Formatting when inserting a row | Excel Worksheet Functions | |||
Conditional Formatting Reference / Inserting Rows | Excel Worksheet Functions |