1 Attachment(s)
Re: Reporting from a list
I have a spreadsheet called Contracts, and another called Reports
The macro searches unsigned contracts in Contract spreadsheet , and copy the name of Contract and the respective Note on the worksheet called Reports.
Sheet <Contracts>
Attachment 118869
Sheet <Reports> after running the macro.
Attachment 114247
Code...
Code:
Sub report()
Dim nrow As Integer, x As Integer
nrows = Worksheets("Contracts").UsedRange.Rows.Count 'Sheet containing Contracts, Notes, Dates
x = 2
For i = 2 To nrows
If Not IsDate(Worksheets("Contracts").Cells(i, 3).Value) Then
Me.Cells(x, 1).Value = Worksheets("Contracts").Cells(i, 1).Value 'Contract name
Me.Cells(x, 2).Value = Worksheets("Contracts").Cells(i, 2).Value 'Note
x = x + 1
End If
Next i
End Sub
Note: I placed code onto sheet called <Report>. You has to change data to suit your needs.
Edit:
Quote:
and import the content on my reports page at the click of a button.
Notice button (8 ball) in pic 1 above. This button run this macro for me. Then you need add some button to QAT.
http://office.microsoft.com/en-gb/ex...001234105.aspx
HTH