Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, i have the code below (Compliments Peter T) that is doing what i
want it to. On hindsight i do not need to show the month with every list, but just the total. How would i modify the code to show just the total and not the month ??? Sub test() Dim arrTotals(1 To 12, 1 To 2) As Double Dim arr, i As Integer, m As Variant With Range("G6") arr = .Resize(.End(xlDown).Row - .Row + 1, 2) End With For i = 1 To UBound(arr) m = Month(arr(i, 1)) arrTotals(m, 2) = arrTotals(m, 2) + arr(i, 2) Next For i = 1 To 12 arrTotals(i, 1) = i Next Range("O1:P12").Value = arrTotals<-Inserts month and total End Sub Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modify code | Excel Discussion (Misc queries) | |||
Modify Code | Excel Worksheet Functions | |||
almost there ... code modify help | Excel Programming | |||
Modify code in UDF | Excel Programming | |||
How to modify VBA code for Add-in? | Excel Programming |