Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
wonderboy55
 
Posts: n/a
Default How do I delete a row from a spreadsheet if criteria is not met i.

In a spreadsheet, a column has 30 minutes or 60 minutes. Is there a way to
delete the entire row if the minutes < 30?

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Need VBA for that


Dim iLastRow As Long
Dim i As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 1 Step -1
If Cells(i, "A").Text = "00:30" Or Cells(i, "A").Text = "01:00" Then
Rows(i).Delete
End If
Next i

--
HTH

Bob Phillips

"wonderboy55" wrote in message
...
In a spreadsheet, a column has 30 minutes or 60 minutes. Is there a way to
delete the entire row if the minutes < 30?



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
Scan and copy cells from one spreadsheet to another. Mark Excel Discussion (Misc queries) 1 April 6th 05 06:45 PM
Some exported records do not show on spreadsheet vulcan88 Excel Worksheet Functions 0 March 30th 05 01:11 AM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM
How do I delete blank rows at the bottom of a spreadsheet to get . Miklaurie Excel Discussion (Misc queries) 1 January 26th 05 02:30 PM
How do I delete 100 account numbers from a spreadsheet colume wer. Ndubuisi Azuogu Excel Worksheet Functions 2 November 11th 04 04:11 PM


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