ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Totals for months (https://www.excelbanter.com/excel-programming/344026-totals-months.html)

MS[_6_]

Totals for months
 
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


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com