Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Excel > basic excel question


Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2003, 11:12 AM
zugdud zugdud is offline
Newcomer
 
Join Date: Jan 2003
Posts: 12
Default basic excel question


Greetings, How can i remove blank rows from a worksheet? I have a worksheet with 7000 rows of data and the worksheet contains 2000 blank rows making a total of 9000 rows. I would like to elminiate these 2000 blank rows at the end of the work sheet. Thanks, any help appricated
Reply With Quote
  #2  
Old 03-22-2003, 11:37 AM
McF's Avatar
McF McF is offline
Junior Contributor
 
Join Date: Feb 2003
Location: South Carolina
Posts: 215
Default

Quote:
Originally Posted by zugdud
Greetings, How can i remove blank rows from a worksheet? I have a worksheet with 7000 rows of data and the worksheet contains 2000 blank rows making a total of 9000 rows. I would like to elminiate these 2000 blank rows at the end of the work sheet. Thanks, any help appricated



Try:
You can click on one or more column letters or one or more row numbers in the frame area, and click on Edit on the menu bar. Select the option of Delete and the highlighted column or row would be deleted. These columns or rows can be empty or contain information.
__________________
"Success is dependent on effort."~Sophocles
"Behold the turtle. He makes progress only when he stick his neck out."~James Bryant Conant
Reply With Quote
  #3  
Old 03-22-2003, 12:50 PM
Wamphyri's Avatar
Wamphyri Wamphyri is offline
Variable not defined

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Ottawa, Ontario
Posts: 4,793
Default

If all the rows containing data have data in a certain Column you could write a quick little macro to erase all rows that do not contain data in that cell
Code:
For i = Worksheets(1).UsedRange.End(xlDown).Row To 1 Step -1 'Is the cell at (row i, column 1) empty If Cells(i, 1).Value = "" Then Cells(i, 1).Delete End If Next
__________________
-Carl
Reply With Quote
  #4  
Old 03-23-2003, 12:08 AM
zugdud zugdud is offline
Newcomer
 
Join Date: Jan 2003
Posts: 12
Default

thanks alot man, that seemed to do the trick!
Reply With Quote
  #5  
Old 03-24-2003, 06:22 AM
Mill Mill is offline
Just another Excel nerd

Retired Moderator
* Guru *
 
Join Date: Feb 2000
Location: Michigan, USA
Posts: 2,624
Default

Here's a method that checks to make sure the entire row is empty:

http://www.j-walk.com/ss/excel/tips/tip56.htm
__________________
"The face of a child can say it all, especially the mouth part of the face." - Jack Handey
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MsFlexGrid & VBA msl Word, PowerPoint, Outlook, and Other Office Products 2 09-17-2006 03:21 PM
Easy excel question blitz84 Word, PowerPoint, Outlook, and Other Office Products 4 03-05-2003 09:16 AM
OLE, Excel, Visual Basic... VBGestapo Word, PowerPoint, Outlook, and Other Office Products 8 08-01-2002 02:51 PM
Excel to Text question bene Word, PowerPoint, Outlook, and Other Office Products 2 02-27-2002 08:11 AM
Using Excel by Visual Basic toekreem Word, PowerPoint, Outlook, and Other Office Products 10 01-17-2002 08:44 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->