Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone tell me what is the meaning if this code
LastRow = Range("A65536").End(xlUp).Row For i = LastRow To 2 Step -1 If Range("A" & i).Value < _ Range("A" & i - 1).Value Then Range("A" & i).EntireRow.Insert End If thanks a lot |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That code
'Record the last row number where the Col_A value is not blank LastRow = Range("A65536").End(xlUp).Row Loop backwards up the rows, starting with that row, decrementing by 1 For i = LastRow To 2 Step -1 'If the value of the referenced cell in Col_A does not match the cell above it... If Range("A" & i).Value < _ Range("A" & i - 1).Value Then 'Insert a row Range("A" & i).EntireRow.Insert End If 'Assuming this code is in there somewhere Next i Does that help? *********** Regards, Ron XL2002, WinXP "andresg1975" wrote: Can someone tell me what is the meaning if this code LastRow = Range("A65536").End(xlUp).Row For i = LastRow To 2 Step -1 If Range("A" & i).Value < _ Range("A" & i - 1).Value Then Range("A" & i).EntireRow.Insert End If thanks a lot |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes. I appreciate your help, thanks a lot
"Ron Coderre" wrote: That code 'Record the last row number where the Col_A value is not blank LastRow = Range("A65536").End(xlUp).Row Loop backwards up the rows, starting with that row, decrementing by 1 For i = LastRow To 2 Step -1 'If the value of the referenced cell in Col_A does not match the cell above it... If Range("A" & i).Value < _ Range("A" & i - 1).Value Then 'Insert a row Range("A" & i).EntireRow.Insert End If 'Assuming this code is in there somewhere Next i Does that help? *********** Regards, Ron XL2002, WinXP "andresg1975" wrote: Can someone tell me what is the meaning if this code LastRow = Range("A65536").End(xlUp).Row For i = LastRow To 2 Step -1 If Range("A" & i).Value < _ Range("A" & i - 1).Value Then Range("A" & i).EntireRow.Insert End If thanks a lot |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
meaning of E in y=3E-.05x^3 | Charts and Charting in Excel | |||
what is the meaning of <? | Excel Worksheet Functions | |||
meaning of ######### | Excel Discussion (Misc queries) | |||
meaning of -- in the formulas | Excel Worksheet Functions | |||
Meaning of simple code | Excel Programming |