Hello all
Need to find a Script that would Delete every other row in Excel say starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on
Thanks
Scott
Hello all
Need to find a Script that would Delete every other row in Excel say starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on
Thanks
Scott
hi
somthing like this, delete every scecond row
Sub DeleteRows()
Dim i As Long, lastrow As Long
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lastrow Step 2
Rows(i).Delete
Next
End Sub
Regards Yngve
for i = 100 to 1 step -2
rows(i).Delete
Next
--
Regards,
Tom Ogilvy
"Sawyer" wrote:
> Hello all
>
> Need to find a Script that would Delete every other row in Excel say starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on
>
> Thanks
>
> Scott
>
I like this one straight to the point and easy to change
"Tom Ogilvy" <TomOgilvy@discussions.microsoft.com> wrote in message
news:6C4D50B4-1019-492E-9E2F-49B9CD0BC8EF@microsoft.com...
> for i = 100 to 1 step -2
> rows(i).Delete
> Next
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> "Sawyer" wrote:
>
>> Hello all
>>
>> Need to find a Script that would Delete every other row in Excel say
>> starting at Row A1 to Row A100 it would delete A2,A4,A6 and so on
>>
>> Thanks
>>
>> Scott
>>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks