LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default delete rows in a given range

Option Explicit
Sub deletesortedduplicates()
Dim i As Long
Dim MC As Long
MC = 1 'col A
For i = Cells(Rows.Count, MC).End(xlUp).Row To 1 Step -1
If Cells(i, MC) = "" and cells(i,mc+2)<"" Then Rows(i).Delete
Next i
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wen" wrote in message
...
Anyone has a good sub to delete from a given range any row with blank
index cell?
For example, I have a table range with column A titled "Name" as index
column. I need a sub that deletes any row where column A is blank, but
say, column C has non-blank value. it is not the same as deleting all
blank rows in a range.
TIA.
Wen


 
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
Select a range of rows to delete Donna[_3_] Excel Worksheet Functions 2 January 26th 10 07:32 PM
Delete rows if not as range Kashyap Excel Programming 3 March 29th 09 11:11 AM
delete row and 3 rows below by range selected Corey Excel Programming 2 November 28th 06 08:14 AM
delete rows in range - macro hindu cliparts Excel Worksheet Functions 0 November 16th 06 09:54 PM
Delete a range of rows ? SpookiePower Excel Programming 6 January 24th 06 03:24 PM


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