Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default deleting cells

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default deleting cells

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




wrote in message
...
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
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
Deleting all cells that appear more than once Johnny Excel Discussion (Misc queries) 5 November 2nd 07 05:03 PM
Deleting Cells or Rows of Cells Nelly Excel Discussion (Misc queries) 3 August 22nd 07 11:46 AM
deleting cells Learner[_4_] Excel Programming 0 November 17th 06 12:37 AM
deleting unused cells / getting rid of inactive cells Woody13 Excel Discussion (Misc queries) 3 January 26th 06 09:11 PM
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content rmaloy Excel Programming 5 February 9th 04 01:59 AM


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