Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default delete rows with empty cells throughout the data

How would i delete the rows of data if any of the cells are empty for
say a range a1 to i400?

thanks,

gr

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default delete rows with empty cells throughout the data

gr,

Range("A1:I400").SpecialCells(xlCellTypeBlanks).En tireRow.Delete

HTH,
Bernie
MS Excel MVP


"rutski" wrote in message
...
How would i delete the rows of data if any of the cells are empty for
say a range a1 to i400?

thanks,

gr



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default delete rows with empty cells throughout the data

This will delete the entire row if the cell in ColumnA is blank:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub


Regards,
Ryan---

--
RyGuy


"Bernie Deitrick" wrote:

gr,

Range("A1:I400").SpecialCells(xlCellTypeBlanks).En tireRow.Delete

HTH,
Bernie
MS Excel MVP


"rutski" wrote in message
...
How would i delete the rows of data if any of the cells are empty for
say a range a1 to i400?

thanks,

gr




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default delete rows with empty cells throughout the data

On Nov 16, 10:22 am, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
gr,

Range("A1:I400").SpecialCells(xlCellTypeBlanks).En tireRow.Delete

HTH,
Bernie
MS Excel MVP

"rutski" wrote in message

...

How would i delete the rows of data if any of the cells are empty for
say a range a1 to i400?


thanks,


gr


thanks Bernie
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default delete rows with empty cells throughout the data

On Nov 16, 10:44 am, ryguy7272
wrote:
This will delete the entire row if the cell in ColumnA is blank:
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub

Regards,
Ryan---

--
RyGuy

"Bernie Deitrick" wrote:
gr,


Range("A1:I400").SpecialCells(xlCellTypeBlanks).En tireRow.Delete


HTH,
Bernie
MS Excel MVP


"rutski" wrote in message
...
How would i delete the rows of data if any of the cells are empty for
say a range a1 to i400?


thanks,


gr


thanks ryguy
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
How to Delete empty rows in excel in b/w rows with values Dennis Excel Worksheet Functions 3 August 28th 07 04:15 PM
delete rows with empty cells Slohcin Excel Discussion (Misc queries) 14 December 19th 06 05:14 PM
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows Scott Excel Worksheet Functions 0 December 13th 06 01:25 AM
How can I globally delete empty cells or rows in different places McLeod Excel Discussion (Misc queries) 3 May 17th 06 11:23 PM
Delete rows with empty cells in columns B&C Richard Excel Discussion (Misc queries) 3 March 18th 06 12:15 AM


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