Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to delete rows if cell blank in column | Excel Discussion (Misc queries) | |||
To delete rows when more than one cell is blank | Excel Worksheet Functions | |||
How can I Delete rows were the first cell is blank? | Excel Programming | |||
Delete entire rows where there is a blank in column A | Excel Programming | |||
To Delete the specific rows when blank is found on column A | Excel Programming |