Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Eliminating Blank Rows

I have a huge Spreadsheet with data from which I want to eliminate all empty
rows.

Is there a simple Macro to do that?

(I have only experience with Macros when I can create them by recording...)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Eliminating Blank Rows

A simple way is to do a sort. the empty lines will either end up at the top
or bottom of the worksheet.

"Tatebana" wrote:

I have a huge Spreadsheet with data from which I want to eliminate all empty
rows.

Is there a simple Macro to do that?

(I have only experience with Macros when I can create them by recording...)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Eliminating Blank Rows

Sub Macro2()
Dim j As Long
Dim i As Long
Dim r As Range

j = Cells(Rows.Count, "A").End(xlUp).Row

For i = 1 To j
If Application.CountA(Rows(i)) = 0 Then
If r Is Nothing Then
Set r = Rows(i)
Else
Set r = Union(r, Rows(i))
End If
End If
Next i

If Not r Is Nothing Then
r.Delete

End If



End Sub

--
Gary's Student
gsnu200707


"Tatebana" wrote:

I have a huge Spreadsheet with data from which I want to eliminate all empty
rows.

Is there a simple Macro to do that?

(I have only experience with Macros when I can create them by recording...)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Eliminating Blank Rows

Dear Joël,

unfortunately this does not the trick, because the data I need is one row
below a non-blank row and belongs to that row above. All data comes in one
column, say, A.


(I recorded a macro, that selects 100's of empty rows individually and
eliminates them, but that works of course only, of there is always the same
pattern of empty rows)

Name 1
Data
blank
blank
blank
Name 2
Data
blank
blank
etc.

After elimination of the empty rows, I have to get the Data next to the name
in column B. I do that also "semi automatic" with a Macro moving the Data one
up and one to the right and eliminate the "new" empty rows again...



"Joel" wrote:

A simple way is to do a sort. the empty lines will either end up at the top
or bottom of the worksheet.

"Tatebana" wrote:

I have a huge Spreadsheet with data from which I want to eliminate all empty
rows.

Is there a simple Macro to do that?

(I have only experience with Macros when I can create them by recording...)

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Eliminating Blank Rows

Select a column.

F5SpecialBlanksOK.

EditDeleteEntire Row.

No macro needed.


Gord Dibben MS Excel MVP

On Mon, 19 Feb 2007 06:21:05 -0800, Tatebana
wrote:

Dear Joël,

unfortunately this does not the trick, because the data I need is one row
below a non-blank row and belongs to that row above. All data comes in one
column, say, A.


(I recorded a macro, that selects 100's of empty rows individually and
eliminates them, but that works of course only, of there is always the same
pattern of empty rows)

Name 1
Data
blank
blank
blank
Name 2
Data
blank
blank
etc.

After elimination of the empty rows, I have to get the Data next to the name
in column B. I do that also "semi automatic" with a Macro moving the Data one
up and one to the right and eliminate the "new" empty rows again...



"Joel" wrote:

A simple way is to do a sort. the empty lines will either end up at the top
or bottom of the worksheet.

"Tatebana" wrote:

I have a huge Spreadsheet with data from which I want to eliminate all empty
rows.

Is there a simple Macro to do that?

(I have only experience with Macros when I can create them by recording...)


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
Sorting and Eliminating Blank Cells in Formula range Santas Helper Excel Worksheet Functions 3 November 24th 06 07:13 PM
Eliminating rows in Excel worksheet 340mango Excel Worksheet Functions 1 May 24th 06 07:49 PM
Eliminating blank cells in a list on a ROW grime Excel Worksheet Functions 5 November 3rd 05 05:41 PM
Eliminating Blank Cells From Lists on different worksheets Tim Excel Discussion (Misc queries) 3 November 3rd 05 12:37 PM
eliminating extra rows in spreadsheet roger-e Excel Discussion (Misc queries) 2 August 19th 05 07:33 PM


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