|
-
May 16th, 2014, 10:55 AM
#1
Thread Starter
Lively Member
-
May 17th, 2014, 01:35 PM
#2
Addicted Member
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.

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:
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
Last edited by 3com; May 17th, 2014 at 01:48 PM.
Reason: Miss something
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|