LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Deleting Empty Rows using VBA code without the need to activat

Many Thanks Marcus - Have a great week

Roger

"marcus" wrote:

Hi Roger

Here is the procedure which will work only on those sheets which start
with 'St' Adjust to suit. If you have sheets you don't want it to
work on which do start with St let us know.

Take care
Marcus


Option Explicit
Option Compare Text
Sub DelBlankColB()

Dim lw As Integer
Dim ws As Worksheet

Application.ScreenUpdating = False

For Each ws In ThisWorkbook.Worksheets
If Left(ws.Name, 2) = "St" Then
lw = ws.Range("B" & Rows.Count).End(xlUp).Row
ws.Range("B1:B" & lw).SpecialCells
(xlCellTypeBlanks).EntireRow.Delete
End If
Next ws

End Sub
.



 
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
Deleting empty rows Felix New Users to Excel 1 February 3rd 09 07:48 AM
Deleting Empty Rows Darryl Excel Programming 3 June 20th 06 10:52 PM
Deleting empty rows edward0380 Excel Programming 4 December 6th 05 07:51 PM
Deleting non empty rows Jan Kronsell Excel Programming 3 October 22nd 05 11:18 PM
Deleting empty rows Foss Excel Programming 4 June 4th 04 07:41 AM


All times are GMT +1. The time now is 06:24 AM.

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

About Us

"It's about Microsoft Excel"