Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Deleting rows in multiple worksheets

I need help in deleting empty rows on multiple worksheets where the empty row
is a different row number on each of the worksheets. I also need to delete
the empty rows at the bottom of the worksheets after the last line of data.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Deleting rows in multiple worksheets

I need help in deleting empty rows on multiple worksheets where the empty
row
is a different row number on each of the worksheets.


Are you saying you want to delete all empty rows or one specific empty row
each worksheet? If you want to delete one specific row on each worksheet you
will have to have some way of indicating to Excel where to find that row
number. Maybe by using a helper row or a interior color, etc.

I also need to delete the empty rows at the bottom of the worksheets after the last line of data.


I'm not quite sure why you want to delete empty rows below the last line.
They are empty, and if you delete them they will still remain there.

--
Cheers,
Ryan


"Elizabeth" wrote:

I need help in deleting empty rows on multiple worksheets where the empty row
is a different row number on each of the worksheets. I also need to delete
the empty rows at the bottom of the worksheets after the last line of data.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Deleting rows in multiple worksheets

The rows that I want to delete within the workbooks are colored on each
worksheet but they are a different row in each worksheet.

The rows that I want to delete at the end of the worksheets has information
in them but not all of the cells are completed. They have a #n/a in the
cells where data is missing in the row. Hope that helps.

"RyanH" wrote:

I need help in deleting empty rows on multiple worksheets where the empty

row
is a different row number on each of the worksheets.


Are you saying you want to delete all empty rows or one specific empty row
each worksheet? If you want to delete one specific row on each worksheet you
will have to have some way of indicating to Excel where to find that row
number. Maybe by using a helper row or a interior color, etc.

I also need to delete the empty rows at the bottom of the worksheets after the last line of data.


I'm not quite sure why you want to delete empty rows below the last line.
They are empty, and if you delete them they will still remain there.

--
Cheers,
Ryan


"Elizabeth" wrote:

I need help in deleting empty rows on multiple worksheets where the empty row
is a different row number on each of the worksheets. I also need to delete
the empty rows at the bottom of the worksheets after the last line of data.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Deleting rows in multiple worksheets

See if this will do the job. As I understand it, you
have several sheets with blank rows and you want those
blank rows deleted. If you have formulas in those rows
that produce zero length strings ("") then they will not
be deleted. If you want those deleted also, the code
will need to be modified. One other thing, the rows to
be hidden are based on the last row in column A with
data in it. If column A is not equal to the longest row,
the the code will need to be modified. Try it on a copy
before running it on the actual workbook.


Sub delEmpRw()
Dim s As Long, i As Long
For s = 1 To ThisWorkbook.Sheets.Count
With Sheets(s)
lsRw = .Cells(Rows.Count, 1).End(xlUp).Row
For i = lsRw To 2 Step -1 'Assumes Header Row
If WorksheetFunction.CountA(.Range("A" & i & ":" _
& .Cells(i, Columns.Count).End(xlToLeft).Address)) = 0 Then
.Rows(i).Delete
End If
Next
.Rows(Sheets(s).Cells(Rows.Count, 1) _
.End(xlUp).Row + 1 & ":" & Rows.Count).Hidden = True
x = 0
End With
Next
End Sub




"Lizz45ie" wrote:

The rows that I want to delete within the workbooks are colored on each
worksheet but they are a different row in each worksheet.

The rows that I want to delete at the end of the worksheets has information
in them but not all of the cells are completed. They have a #n/a in the
cells where data is missing in the row. Hope that helps.

"RyanH" wrote:

I need help in deleting empty rows on multiple worksheets where the empty

row
is a different row number on each of the worksheets.


Are you saying you want to delete all empty rows or one specific empty row
each worksheet? If you want to delete one specific row on each worksheet you
will have to have some way of indicating to Excel where to find that row
number. Maybe by using a helper row or a interior color, etc.

I also need to delete the empty rows at the bottom of the worksheets after the last line of data.


I'm not quite sure why you want to delete empty rows below the last line.
They are empty, and if you delete them they will still remain there.

--
Cheers,
Ryan


"Elizabeth" wrote:

I need help in deleting empty rows on multiple worksheets where the empty row
is a different row number on each of the worksheets. I also need to delete
the empty rows at the bottom of the worksheets after the last line of data.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Deleting rows in multiple worksheets

I need to get a few specifics before I can write code for your application.

1.) So you want to delete all colored rows and all worksheets? Do you want
to delete only certain colored rows? Please be specific.

2.) You want to delete all rows that are totally empty, rows that contain
#N/A, or all rows after a certain cell in a particular column. Please be
specific.
--
Cheers,
Ryan


"Lizz45ie" wrote:

The rows that I want to delete within the workbooks are colored on each
worksheet but they are a different row in each worksheet.

The rows that I want to delete at the end of the worksheets has information
in them but not all of the cells are completed. They have a #n/a in the
cells where data is missing in the row. Hope that helps.

"RyanH" wrote:

I need help in deleting empty rows on multiple worksheets where the empty

row
is a different row number on each of the worksheets.


Are you saying you want to delete all empty rows or one specific empty row
each worksheet? If you want to delete one specific row on each worksheet you
will have to have some way of indicating to Excel where to find that row
number. Maybe by using a helper row or a interior color, etc.

I also need to delete the empty rows at the bottom of the worksheets after the last line of data.


I'm not quite sure why you want to delete empty rows below the last line.
They are empty, and if you delete them they will still remain there.

--
Cheers,
Ryan


"Elizabeth" wrote:

I need help in deleting empty rows on multiple worksheets where the empty row
is a different row number on each of the worksheets. I also need to delete
the empty rows at the bottom of the worksheets after the last line of data.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Deleting rows in multiple worksheets

1. I want to delete all colored rows if they are empty.
2. Delete all rows at the bottom of the worksheet if column "R" is empty.
Columns A - O contains formulas that are used in other parts of the worksheet.

"RyanH" wrote:

I need to get a few specifics before I can write code for your application.

1.) So you want to delete all colored rows and all worksheets? Do you want
to delete only certain colored rows? Please be specific.

2.) You want to delete all rows that are totally empty, rows that contain
#N/A, or all rows after a certain cell in a particular column. Please be
specific.
--
Cheers,
Ryan


"Lizz45ie" wrote:

The rows that I want to delete within the workbooks are colored on each
worksheet but they are a different row in each worksheet.

The rows that I want to delete at the end of the worksheets has information
in them but not all of the cells are completed. They have a #n/a in the
cells where data is missing in the row. Hope that helps.

"RyanH" wrote:

I need help in deleting empty rows on multiple worksheets where the empty
row
is a different row number on each of the worksheets.

Are you saying you want to delete all empty rows or one specific empty row
each worksheet? If you want to delete one specific row on each worksheet you
will have to have some way of indicating to Excel where to find that row
number. Maybe by using a helper row or a interior color, etc.

I also need to delete the empty rows at the bottom of the worksheets after the last line of data.

I'm not quite sure why you want to delete empty rows below the last line.
They are empty, and if you delete them they will still remain there.

--
Cheers,
Ryan


"Elizabeth" wrote:

I need help in deleting empty rows on multiple worksheets where the empty row
is a different row number on each of the worksheets. I also need to delete
the empty rows at the bottom of the worksheets after the last line of data.

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
Inserting/deleting rows between worksheets Klee Excel Worksheet Functions 4 July 22nd 07 07:41 PM
Deleting pictures from multiple worksheets dford Excel Discussion (Misc queries) 2 December 24th 06 04:43 AM
deleting rows across worksheets? dr chuck Excel Programming 2 November 8th 06 03:58 PM
Question about deleting rows from sorted linked worksheets DewChugr Excel Worksheet Functions 0 September 20th 05 09:25 PM
Deleting a rows from multiple worksheets School Teacher Excel Worksheet Functions 0 July 6th 05 06:52 PM


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