Hi all,

I got the script below from another thread, tested it and it works fine. There are quite a few changes i would like to make to end to meet my ends and as usual i figured someone here could help.

In the long run i want the script to run through a list of customer numbers, check the 'Statement ID' for that customer, append the days transactions to the customer statement sheet.

But one step at a time....

To begin, the script below runs through a list of customer numbers on sheet "sales" and for those that match cell "L19" in that sheet willl copy and paste to a sheet called "Summary"



Sub test2()
Dim SHTNM As String
Dim R As Long
R = 1


SHTNM = "sales"
Sheets(SHTNM).Select
With Sheets(SHTNM).Range("b1", Range("b65536").End(xlUp).Address)

Set c = .Find(Range("l19"), LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Sheets(SHTNM).Range(c.Address).EntireRow.Copy
Sheets("Summary").Cells(R, 1).PasteSpecial xlPasteAll
R = R + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With


Sheets("Summary").Select
End Sub


At the moment the only criteria is "Cus Number" or "Cell L19". Could someone please help with two criteria e.g for matching "L19" and todays date or date defined in cell "L20"?

I'm not sure if this is a loop but i know i'll have to use that soon....

THanks again for all the help.

Chris