View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Anthony Anthony is offline
external usenet poster
 
Posts: 275
Default VB code donation required please!

Bob,thanks
I input the code and got a
Runtime error 1004
Application-defined or object defined error

uh !!!!!

"Bob Phillips" wrote:

Sub Test()
Dim iLastRow As Long
Dim i As Long
Dim j As Long

With Worksheets("Log")
iLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
If .Cells(i, "A").Value = Date Then
j = j + 1
.Cells(i, "A").Resize(, 24).Copy _
Worksheets("print").Cells(j, "A")
End If
Next i
End With

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Anthony" wrote in message
...
Don,
thanks for your reply,
but how do you 'tell' a recoding macro that the dates listed in column A

are
to be matched , ie if my lcolumn has aprox 1000 lines of dates, of which

150
have todays date, how do I get the macro (whilst being recorded) to do

this.


"Don Guillett" wrote:

we learn by doing so record a macro while you do this. Then come back

for
more help

sort by datecopypaste

--
Don Guillett
SalesAid Software

"Anthony" wrote in message
...
Can you help a novice and provide some vb code to do the following...

in worksheet1 (log) column A contains an unlimited number of dates
columns B:Y contain other data.
I want a search made for the whole of column A for 'todays' date and

each
time a match is found to copy that particular rows data (cells B:Y)

into
worksheet2 (print). This loop is continued until the whole of column A

has
been searched
so basicaly a list of data found matching todays date is pasted to

another
sheet.

easy uh !

thanks in advancve