Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following code which deletes all rows older then 365 days:
Sub Del_Oldies() LR = Cells(Rows.Count, 1).End(xlUp).Row For R = LR To 1 Step -1 If Date - Cells(R, 1) 365 Then Cells(R, 1).EntireRow.Delete Next End Sub I keep getting error message Compile error: Variable not defined with "LR =" highlighted in blue How do I modify this code to declare the variables R, and LR as Integers . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declare Variables in Array | Excel Discussion (Misc queries) | |||
Declare and Set Public variables | Excel Discussion (Misc queries) | |||
how to declare local variables for Excel.Workbook at runtime. | Excel Discussion (Misc queries) | |||
How to efficiently declare variables | Excel Discussion (Misc queries) | |||
How to declare a dynamic array | Excel Discussion (Misc queries) |