SRMPURCHASE
Board Regular
- Joined
- Dec 23, 2014
- Messages
- 212
- Office Version
- 2016
- Platform
- Windows
I consistently use the VBA below to insert a blank row above a row of data and copy it up to the newly inserted blank row, then edit a cell or two in the new data row and save the file.
Sub COPYROWINFOUP()
With Selection.EntireRow
.Copy
.Insert
End With
Application.CutCopyMode = False
End Sub
How do I include the newly created row into the conditional formatting "Applies to" field?
Before Data Entry
=$F$21:$F$3500
After Data Entry:
=$F$21:$F$607,$F$1160:$F$1664,$F$609:$F$612,$F$1890:$F$3507,$F$674:$F$923,$F$925:$F$1158,$F$1666:$F$1888,$F$614:$F$672
Currently every time I copy row info up it creates another conditional format for that cell only and additionally adds it to the current "Applies to", eventually causing a conditional format error and crashes Excel.
What do I need to do to not create a separate condition format for that cell and change the "Applies To" to the jumble noted above?
Sub COPYROWINFOUP()
With Selection.EntireRow
.Copy
.Insert
End With
Application.CutCopyMode = False
End Sub
How do I include the newly created row into the conditional formatting "Applies to" field?
Before Data Entry
=$F$21:$F$3500
After Data Entry:
=$F$21:$F$607,$F$1160:$F$1664,$F$609:$F$612,$F$1890:$F$3507,$F$674:$F$923,$F$925:$F$1158,$F$1666:$F$1888,$F$614:$F$672
Currently every time I copy row info up it creates another conditional format for that cell only and additionally adds it to the current "Applies to", eventually causing a conditional format error and crashes Excel.
What do I need to do to not create a separate condition format for that cell and change the "Applies To" to the jumble noted above?