Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Deleting empty rows and field names in report

I have a report which has embedded into it, blank rows and
the names of fields at the beginning of each page. I tried
to do a macro to seach in column A in excel for blank
cells and cells with the name of the first field called
plnt; the macro should then delete those fields.

Unfortunately, I am just learning visual basic and can't
do it. Below is what I had done. Please help. Thanks.

Pele





Sub MacDeleterows()
'
' MacDeleterows Macro
'

Range("a2").Select
Do Until ActiveCell.SpecialCells(xlCellTypeLastCell)

If ActiveCell = "" Or ActiveCell = "plnt" Then
Selection.EntireRow.Delete
ActiveCell.Offset(1, 0).Select
'Range("A1").Select
'ActiveCell.SpecialCells(xlLastCell).Select
End If
Loop
End Sub
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
Deleting empty rows Felix New Users to Excel 1 February 3rd 09 07:48 AM
deleting empty rows EngelseBoer Excel Discussion (Misc queries) 3 September 7th 08 01:09 AM
Deleting All Empty Rows bodhisatvaofboogie Excel Discussion (Misc queries) 3 May 18th 06 12:36 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM
Deleting empty rows Foss Excel Programming 4 June 4th 04 07:41 AM


All times are GMT +1. The time now is 11:16 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"