Totals for months

M

MS

Hi,

Is possible to modify this program for have
the divided total for months in the "D"
column?

Regards.

Marcello

For example:

|A |B |C |D
| Page | Date | Import | Total
| 1 | 10/04/2005 | 32,50 |
| 1 | 12/04/2005 | 12,50 | 45,00
| 1 | 11/05/2005 | 52,50 |
| 1 | 30/05/2005 | 10,50 | 63,00
| 1 | 10/06/2005 | 19,50 | 19.50


Sub EnumSheet1()
Dim sh As Worksheet
Dim Name As String
Dim I As Long
Dim DataDoc As Date
Dim ConPag As Currency

I = 1

With Sheets("sheet1")
For Each sh In Worksheets
If sh.Name <> "Sheet1" Then

DataDoc = sh.Cells(21, 4)
ConPag = sh.Cells(85, 7)
I = I + 1
.Cells(I, 1) = sh.Name
.Cells(I, 2) = DataDoc
.Cells(I, 3) = ConPag
End If
Next
End With
End Sub
 

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

Similar Threads


Top