Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All the replies look good guys, thanks for the help. I tried Rick's first,
but I failed to explain one of my cateria, and his being the simplest code didn't cover my criteria. Not his fault though, my fault for not explaining. Luckily though after rereading the replies I found that GTVT covered what I need, so it is what I am currently using. Anyway thanks for all your help guys, including you Mike, who I didn't mention. "GTVT06" wrote: Hello, Try this Sub DeleteSemester() Dim i As Integer Dim cell As Range i = 1 For Each cell In Range("A65536:M65536") If cell.End(xlUp).Row i Then i = cell.End(xlUp).Row Next cell If i <= 6 Then Exit Sub Range("N1:AR100").Cut Cells(305, "N") Dim lr As Long, x As Long lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row x = lr - 5 ActiveSheet.Rows(x & ":" & lr - 1).Delete Range("N300:AR400").Cut Cells(1, "N") End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Marco | Excel Programming | |||
Marco Help | Excel Programming | |||
Marco Help | Excel Discussion (Misc queries) | |||
marco help | Excel Programming | |||
help me with this marco | Excel Programming |