"Please provide VBA Code"...

for WHAT exactly?
In your question:
"deleted the complete rows":   use: Rows("4:4").EntireRow.Delete
 or Range("A4").EntireRow.Delete
or cells(4,1).EntireRow.Delete

"if the cell contains dates before 1/1/2007"
what cell?
any cell in the row?
the cell in column "a" ?
you could use:
 If (DateDiff("d", Cells(4, 1).Value, "1/1/2007") > 0) Then


Or are you asking us to write the entire VBA macro? like:

Sub DeleteRows()
    Dim nRows, R
    nRows = ActiveCell.SpecialCells(xlLastCell).Row
    For R = nRows To 1 Step -1
        If (Cells(R, 1).Value <> "") Then
        If (DateDiff("d", Cells(R, 1).Value, "1/1/2007") > 0) Then
        Cells(R, 1).EntireRow.Delete
        End If
        End If
    Next R
End Sub

Of course, this assumes that the date is in column 1 (A)...
since I have nothing to tell me otherwise.

Or.. are you asking us to tell you how to create VBA code?

your question is too vague.... it means that we have to spend WAY too
much time simply trying to figure out what your question is...
and, like in this case, we have to either provide several answers
in the hope that one fits, or simply ignore the question and let
someone else deal with it...

If you wish for US to spend OUR time in providing YOU with free help,
the least you could do is invest a little of YOUR time in describing
what it is that you need, and what you've accomplished so far.

Paul



________________________________
From: Sundarvelan N <nsund...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Wed, April 21, 2010 4:27:44 AM
Subject: $$Excel-Macros$$ Excel-Macro-VBA Code


Hi Group Friends,


Please help in this regard. I need to deleted the complete rows if the cell 
contains dates before 1/1/2007.

Please provide VBA Code

Thanks
N.Sundarvelan
-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!
 
We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 6,800 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to