Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Want to delete rows based on a condition

Typo "and = Date - 1", sori as keyboard not functioning very good.

"Seeker" wrote:

Hi Gord,
I would like to adopt your code also and tried in column B with = Date and
=Date 1 both work great, however, I would like to delet rows with Date less
than today but I was rejected with the "<", how could I accomplish the less
than effect please?
Rgds

"Gord Dibben" wrote:

I don't understand the "certain cell" bit.

A certain cell should have an address like A1 or B23

Maybe you meant certain column?

This will delete all rows with a certain value in any cell in Column A

Sub DeleteRows_With_Param()
FindString = "qwerty"
Set b = Range("A:A").Find(what:=FindString, lookat:=xlWhole)
While Not (b Is Nothing)
b.entirerow.Delete
Set b = Range("A:A").Find(what:=FindString, lookat:=xlWhole)
Wend
End Sub


Gord Dibben MS Excel MVP


On Fri, 11 Jul 2008 14:05:01 -0700, marcia2026
wrote:

I am trying to do a Loop/Until macro in order to delete all rows with a
certain value in a certain cell. The only thing I can find on deleting rows
requires me to specify the row number. That will be variable



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 Rows based on condition Vic Excel Discussion (Misc queries) 2 August 18th 09 08:54 PM
Macro to delete rows based on a condition Darrilyn Excel Worksheet Functions 1 September 6th 07 12:12 AM
Delete worksheet row based on condition miek Excel Programming 3 August 23rd 07 07:16 PM
How to delete a data row based on a condition wmc New Users to Excel 4 April 18th 07 02:40 PM
Delete Columns based on a condition Joel Mills Excel Programming 3 August 6th 04 07:21 PM


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