P
Paul Moles
Ensure security levels are no higher than medium so that
macro can run and thenuse this to insert new row and date.
Sub Autpen()
'
' Insert_Row_Date Macro
'
'
Range("A1").Select
Selection.EntireRow.Insert
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Use Conditional Formatting on Format menu to set two
conditions.
Cell Value is Greater than or equl to =$A$1+15
format as you like using format button along side for
Font, Border and Pattern,
Second condition Cell Value is less than or qual to
=$A$1+15 again format (but differently), press OK.
Use Format Painter to copy this conditional formatting as
far down column as you need.
Each time book is opened a new row is inserted at the top
with date in cell A1, Conditional format will provide
colour change once date plus today is more than 15.
HTH
Paul
macro can run and thenuse this to insert new row and date.
Sub Autpen()
'
' Insert_Row_Date Macro
'
'
Range("A1").Select
Selection.EntireRow.Insert
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Use Conditional Formatting on Format menu to set two
conditions.
Cell Value is Greater than or equl to =$A$1+15
format as you like using format button along side for
Font, Border and Pattern,
Second condition Cell Value is less than or qual to
=$A$1+15 again format (but differently), press OK.
Use Format Painter to copy this conditional formatting as
far down column as you need.
Each time book is opened a new row is inserted at the top
with date in cell A1, Conditional format will provide
colour change once date plus today is more than 15.
HTH
Paul