Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Delete Date Macro

Any ideas about how to create a code so that every time the word Date
appears in a cell in column A, the row that Date exists in will be deleted?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Delete Date Macro

Sub DeleteDateInA()

FirstRow = 2 'Headings in row 1
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For r = LastRow To FirstRow Step -1
If Range("A" & r).Value = "Date" Then ' Date is the only word in the
cell
'If Range("A" & r).Value like "*Date*" Then ' * Allow text before and
after Date
Rows(r).Delete
End If
Next
End Sub

Hopes this helps

---
Regards,
Per

"Workbook" skrev i meddelelsen
...
Any ideas about how to create a code so that every time the word Date
appears in a cell in column A, the row that Date exists in will be
deleted?


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
Macro to delete rows based on date PMBO Excel Discussion (Misc queries) 4 February 18th 09 01:50 PM
Macro to delete space in front of date Neutron1871 Excel Programming 3 March 24th 05 03:50 AM
Delete Date data macro KAnoe Excel Programming 3 November 6th 04 02:26 AM
macro to find date format in a cell and delete that entire row vikram Excel Programming 8 April 30th 04 06:00 PM
Macro want delete the date row? Shetty Excel Programming 5 March 3rd 04 02:08 PM


All times are GMT +1. The time now is 02:38 AM.

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"