Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can you remove redundant date entry?


Hi

I want to write a macro which allowed me to automatically remove dat
which had expired past today's date?

Has anyone got a clue as to how this is done

--
simoncottl
-----------------------------------------------------------------------
simoncottle's Profile: http://www.excelforum.com/member.php...fo&userid=3312
View this thread: http://www.excelforum.com/showthread.php?threadid=52932

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Can you remove redundant date entry?

this compares dates in column A and removes rows where the date is less than
Today's date

For r = 100 To 2 Step -1
If Cells(r, "A") < Date Then Rows(r).Delete
Next r

I am assuming you mean expiry dates earlier than today.

HTH

"simoncottle" wrote:


Hi

I want to write a macro which allowed me to automatically remove data
which had expired past today's date?

Has anyone got a clue as to how this is done?


--
simoncottle
------------------------------------------------------------------------
simoncottle's Profile: http://www.excelforum.com/member.php...o&userid=33122
View this thread: http://www.excelforum.com/showthread...hreadid=529323


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can you remove redundant date entry?


Can you help

At the moment the macro you suggest does not differentiate betwee
dates, do i have to have my dates in a particular format?

Cheers Simon

PS even if I use the clear contents command which is more what I wan
it removes all the data regardless of whether it is out of date or no

--
simoncottl
-----------------------------------------------------------------------
simoncottle's Profile: http://www.excelforum.com/member.php...fo&userid=3312
View this thread: http://www.excelforum.com/showthread.php?threadid=52932

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
How do I remove redundant rows at end of sheet? Perplexed of Worcs[_2_] Excel Discussion (Misc queries) 2 October 1st 09 01:22 PM
Excel 2002 date entry: Cannot get away from d-m-yy entry format Steve Eklund Excel Discussion (Misc queries) 3 May 11th 09 04:57 PM
Remove last <li entry from cells Easton King Excel Discussion (Misc queries) 17 September 18th 07 03:29 PM
remove entry from namebox WaterNinja Excel Discussion (Misc queries) 1 November 2nd 06 11:26 AM
remove add-in entry via registry RB Smissaert Excel Programming 7 October 16th 04 08:20 PM


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