Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to create a macro that will search every row in columns A:L. Every
time columns I:L do not have contents inside of it, I would like the entire row A:L to be deleted. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteRows()
FirstRow = 2 LastRow = Range("A" & Rows.Count).End(xlUp).Row For r = LastRow To FirstRow Step -1 If WorksheetFunction.CountBlank(Range("I" & r & ":L" & r)) = 4 Then Rows(r).Delete End If Next End Sub Hopes this helps. --- Per "Workbook" skrev i meddelelsen ... I'd like to create a macro that will search every row in columns A:L. Every time columns I:L do not have contents inside of it, I would like the entire row A:L to be deleted. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works like a charm! Thank you for you're help
"Per Jessen" wrote: Sub DeleteRows() FirstRow = 2 LastRow = Range("A" & Rows.Count).End(xlUp).Row For r = LastRow To FirstRow Step -1 If WorksheetFunction.CountBlank(Range("I" & r & ":L" & r)) = 4 Then Rows(r).Delete End If Next End Sub Hopes this helps. --- Per "Workbook" skrev i meddelelsen ... I'd like to create a macro that will search every row in columns A:L. Every time columns I:L do not have contents inside of it, I would like the entire row A:L to be deleted. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Excel Programming | |||
Macro for deleting rows and serialising the remaing rows | Links and Linking in Excel | |||
Macro for deleting rows and serialising the remaing rows | Setting up and Configuration of Excel | |||
Macro for deleting rows and serialising the remaing rows | Excel Worksheet Functions | |||
Macro for deleting rows | Excel Programming |