Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Deleting Rows Macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Deleting Rows Macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Deleting Rows Macro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Programming 2 November 13th 08 01:32 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Macro for deleting rows benxprezoise Excel Programming 4 December 30th 05 10:37 AM


All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"