Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete rows with nothing in Column B


I searched and found a lot of posts on Deleting, but I'm still stuck
There are 900+ rows in my table. Beginning with row 18, I'd like
macro to find the end of the table, identify which rows have nothing i
Colulmn B, and then delete all of those rows. Can anyone help? Than
you

--
marle
-----------------------------------------------------------------------
marlea's Profile: http://www.excelforum.com/member.php...fo&userid=2620
View this thread: http://www.excelforum.com/showthread.php?threadid=50658

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Delete rows with nothing in Column B

Hi Marlea,

Try:

'=============
Public Sub Tester()
Dim LRow As Long

LRow = Cells(Rows.Count, "B").End(xlUp)

On Error Resume Next
Range("B18:B" & LRow). _
SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0


End Sub
'<<=============


---
Regards,
Norman



"marlea" wrote in
message ...

I searched and found a lot of posts on Deleting, but I'm still stuck.
There are 900+ rows in my table. Beginning with row 18, I'd like a
macro to find the end of the table, identify which rows have nothing in
Colulmn B, and then delete all of those rows. Can anyone help? Thank
you.


--
marlea
------------------------------------------------------------------------
marlea's Profile:
http://www.excelforum.com/member.php...o&userid=26209
View this thread: http://www.excelforum.com/showthread...hreadid=506585



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Delete rows with nothing in Column B

Hi Marlea,

LRow = Cells(Rows.Count, "B").End(xlUp)


Should read:

LRow = Cells(Rows.Count, "B").End(xlUp).Row



---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Marlea,

Try:

'=============
Public Sub Tester()
Dim LRow As Long

LRow = Cells(Rows.Count, "B").End(xlUp)

On Error Resume Next
Range("B18:B" & LRow). _
SpecialCells(xlCellTypeBlanks).EntireRow.Delete
On Error GoTo 0


End Sub
'<<=============


---
Regards,
Norman



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete rows with nothing in Column B


Norman, this is fantastic. Thank you so much

--
marle
-----------------------------------------------------------------------
marlea's Profile: http://www.excelforum.com/member.php...fo&userid=2620
View this thread: http://www.excelforum.com/showthread.php?threadid=50658

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 multiple column? x15 Excel Programming 3 December 12th 05 08:38 PM
delete rows if value in column D is repeated DKY[_70_] Excel Programming 5 August 12th 05 11:07 PM
Delete all rows where Column A contains Text D Hafer - TFE Excel Worksheet Functions 3 July 1st 05 06:03 PM
Delete All Rows That Column A value is not in Column A of Sheet2 [email protected] Excel Programming 2 September 3rd 04 09:13 PM
delete rows if dublicate cell value in column 2 gus Excel Programming 1 September 19th 03 03:45 PM


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

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"