PC Review


Reply
Thread Tools Rate Thread

Delete Date Macro

 
 
Workbook
Guest
Posts: n/a
 
      20th Feb 2009
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 With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      20th Feb 2009
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" <(E-Mail Removed)> skrev i meddelelsen
news:681C3AC5-000E-48E7-98F6-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to delete rows based on date PMBO Microsoft Excel Misc 4 18th Feb 2009 01:50 PM
Macro to delete space in front of date =?Utf-8?B?TmV1dHJvbjE4NzE=?= Microsoft Excel Programming 4 29th Mar 2005 11:51 PM
Delete Date data macro =?Utf-8?B?S0Fub2U=?= Microsoft Excel Programming 3 6th Nov 2004 02:26 AM
macro to find date format in a cell and delete that entire row vikram Microsoft Excel Misc 8 30th Apr 2004 05:45 PM
Macro want delete the date row? Shetty Microsoft Excel Programming 5 3rd Mar 2004 02:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:22 PM.