Macros with Date

N

Noe

I try to find the date on a macro but its given me an error can some one
help me please. I just need to find in column E every time is a date 12/28/09
to copy some information and going to the next cell. thank you




Range("e1").Select

'aqui agreagaste el paso de copiar la macro para poder pegar verticalmente


Do While d <> 1

With Application
d = mm / dd / yyyy
Do
If ActiveCell.Value = d Then

ActiveCell.Copy
ActiveCell.Offset(1, -4).Activate
ActiveCell.PasteSpecial
ActiveCell.Offset(0, 4).Activate





If ActiveCell.Value = "BLANK" Then


Else

ActiveCell.Offset(1, 0).Activate



End If

Application.CutCopyMode = False
Call INFORMATIONFOR_EOD2
End If


Loop
End With
Loop
End Sub
 
J

JE McGimpsey

Noe said:
I try to find the date on a macro but its given me an error can some one
help me please. I just need to find in column E every time is a date 12/28/09
to copy some information and going to the next cell. thank you

It's a little hard for me to tell exactly what you're trying to do, but
perhaps this will help:

Dim rCell As Range
For Each rCell In Range("E1:E" & _
Range("E" & Rows.Count).End(xlUp).Row)
With rCell
If .Value = Date Then _
.Offset(0, -4).Value = .Value
End With
Next rCell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top