PC Review


Reply
Thread Tools Rate Thread

Delete Rows if any cell in Column H is blank but do not Delete Fir

 
 
=?Utf-8?B?bWFuZmFyZWVk?=
Guest
Posts: n/a
 
      28th Sep 2007
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 With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      28th Sep 2007
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" <(E-Mail Removed)> wrote in message newsCDD867A-6778-4698-9E5E-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      28th Sep 2007
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

 
Reply With Quote
 
=?Utf-8?B?bWFuZmFyZWVk?=
Guest
Posts: n/a
 
      28th Sep 2007
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

 
Reply With Quote
 
=?Utf-8?B?bWFuZmFyZWVk?=
Guest
Posts: n/a
 
      28th Sep 2007
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" <(E-Mail Removed)> wrote in message newsCDD867A-6778-4698-9E5E-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete all rows where column A is blank Jodie Microsoft Excel Programming 6 14th Dec 2009 07:30 PM
macro to delete rows if cell blank in column puiuluipui Microsoft Excel Misc 4 15th Oct 2009 05:22 PM
Delete rows if column looks blank robyn_willson@hotmail.com Microsoft Excel Programming 4 18th Feb 2009 07:21 PM
Delete entire rows where there is a blank in column A Chris Hankin Microsoft Excel Programming 7 11th Jun 2006 09:56 AM
delete rows where a cell is blank in specific column GottaRun Microsoft Excel Discussion 3 7th Mar 2006 05:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:11 PM.