PC Review


Reply
Thread Tools Rate Thread

deleting cells

 
 
lijia137@gmail.com
Guest
Posts: n/a
 
      13th Dec 2007
I have a workbook that i need to delete some cells automatically after
sorting. The rule is to use one specific column (say column O) as
reference, i.e. values<100 in this column, together with things in the
same rows should be deleted, basically it's to delete a range of data?
how should i write it? Thanks a ton!
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      13th Dec 2007
One way.... Scan the entire rows to perform test from bottom to top.,
testing each column value and deleting entire row. Something like

Sub RemRows()
Dim xr As Long
With ActiveSheet
For xr = 100 To 1 Step -1
If .Cells(xr, "O") < 100 Then Rows(xr).EntireRow.Delete
Next xr
End With

End Sub




--

Regards,
Nigel
(E-Mail Removed)



<(E-Mail Removed)> wrote in message
news:113931cc-a70e-44c3-a264-(E-Mail Removed)...
>I have a workbook that i need to delete some cells automatically after
> sorting. The rule is to use one specific column (say column O) as
> reference, i.e. values<100 in this column, together with things in the
> same rows should be deleted, basically it's to delete a range of data?
> how should i write it? Thanks a ton!


 
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
Deleting Cells or Rows of Cells =?Utf-8?B?TmVsbHk=?= Microsoft Excel Misc 3 22nd Aug 2007 11:46 AM
deleting unused cells / getting rid of inactive cells =?Utf-8?B?V29vZHkxMw==?= Microsoft Excel Misc 3 26th Jan 2006 09:11 PM
Deleting Blank Cells or Zero Value Cells ? Daniel Rascoe Microsoft Excel Worksheet Functions 4 7th Jul 2004 03:47 PM
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content rmaloy Microsoft Excel Programming 5 9th Feb 2004 01:59 AM
adding/deleting cells in a named range of cells Tat Microsoft Excel Worksheet Functions 2 18th Nov 2003 03:38 PM


Features
 

Advertising
 

Newsgroups
 


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