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

i have a worksheet with several columns, and i want to use one
specific colume as my reference, i.e. values under 100 in this column
as well as values/texts in the same rows should be deleted, basically
it's to delete a range of data based on certail value, is there a
way?
thanks a ton!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default delete cells

Assume the data is in column A.

Sub dltunder100()
Dim c As Range
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
For Each c In Range("A1:A" & lastRow)
If c.Value < 100 Then
c.EntireRow.Delete 'can be changed to a specific range
End If
Next
End Sub

" wrote:

i have a worksheet with several columns, and i want to use one
specific colume as my reference, i.e. values under 100 in this column
as well as values/texts in the same rows should be deleted, basically
it's to delete a range of data based on certail value, is there a
way?
thanks a ton!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default delete cells

One posting will usually do it. See your first one.

" wrote:

i have a worksheet with several columns, and i want to use one
specific colume as my reference, i.e. values under 100 in this column
as well as values/texts in the same rows should be deleted, basically
it's to delete a range of data based on certail value, is there a
way?
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
delete cells column. Delete empty cells myshak Excel Worksheet Functions 0 March 9th 09 10:59 PM
how can I delete cells containing text within a range of cells jackwmbg Excel Discussion (Misc queries) 2 June 6th 08 09:08 PM
How to delete all the blanc cells in a worksheet and shift cells l tiramisu Excel Discussion (Misc queries) 2 December 7th 06 03:45 AM
macro to select cells containing specific text and delete all cells but these JenIT Excel Programming 3 March 27th 06 10:07 PM
Delete specific cells contents in a row with some locked cells in the same row trussman Excel Programming 2 March 1st 05 06:12 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"