Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Delete Rows if any cell in Column H is blank but do not Delete Fir

Hi ,

I need to delete any row which has a blank cell in Column H. But I do not
want to delete the first row because this will have a "Title" even though
Column H is blank.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Delete Rows if any cell in Column H is blank but do not Delete Fir

Sub Macro1()
Dim i As Long
Set r = ActiveSheet.UsedRange
i = r.Rows.Count + r.Row - 1
For j = i To 2 Step -1
If IsEmpty(Cells(j, "H")) Then
Rows(j).EntireRow.Delete
End If
Next
End Sub
--
Gary''s Student - gsnu200747


"manfareed" wrote:

Hi ,

I need to delete any row which has a blank cell in Column H. But I do not
want to delete the first row because this will have a "Title" even though
Column H is blank.
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Delete Rows if any cell in Column H is blank but do not Delete

Thanks it works

"Gary''s Student" wrote:

Sub Macro1()
Dim i As Long
Set r = ActiveSheet.UsedRange
i = r.Rows.Count + r.Row - 1
For j = i To 2 Step -1
If IsEmpty(Cells(j, "H")) Then
Rows(j).EntireRow.Delete
End If
Next
End Sub
--
Gary''s Student - gsnu200747


"manfareed" wrote:

Hi ,

I need to delete any row which has a blank cell in Column H. But I do not
want to delete the first row because this will have a "Title" even though
Column H is blank.
Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Delete Rows if any cell in Column H is blank but do not Delete Fir

Try this

http://www.rondebruin.nl/specialcells.htm

Change this line
With Columns("A") ' You can also use a range like this Range("A1:A8000")

To

With Range("H2:H" & Rows.Count)

If you want to start in Row 2



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"manfareed" wrote in message ...
Hi ,

I need to delete any row which has a blank cell in Column H. But I do not
want to delete the first row because this will have a "Title" even though
Column H is blank.
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Delete Rows if any cell in Column H is blank but do not Delete

Thanks for the link



"Ron de Bruin" wrote:

Try this

http://www.rondebruin.nl/specialcells.htm

Change this line
With Columns("A") ' You can also use a range like this Range("A1:A8000")

To

With Range("H2:H" & Rows.Count)

If you want to start in Row 2



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"manfareed" wrote in message ...
Hi ,

I need to delete any row which has a blank cell in Column H. But I do not
want to delete the first row because this will have a "Title" even though
Column H is blank.
Thanks




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
macro to delete rows if cell blank in column puiuluipui Excel Discussion (Misc queries) 4 October 15th 09 05:22 PM
To delete rows when more than one cell is blank [email protected] Excel Worksheet Functions 4 September 27th 06 10:49 PM
How can I Delete rows were the first cell is blank? Mascot Excel Programming 6 July 25th 06 05:02 PM
Delete entire rows where there is a blank in column A Chris Hankin[_2_] Excel Programming 7 June 11th 06 09:56 AM
To Delete the specific rows when blank is found on column A ddiicc Excel Programming 3 August 5th 05 05:32 AM


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