Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an array of sheets consisting of 8 sheets (not the only sheets
in the workbook). I want to sum Col "V" of each sheet in the array, starting in V2:V+lastrow. I also want to perform some formating on the sum, which should be offset by 2 rows from the last row, in each sheet. I need help. TIA Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim v as Variant, sh as Worksheet
Dim rng as Range, rng1 as Range Dim i as Long, dblSum as Double v = Array("sheet1","Sheet2","Sheet3") ' adjust to suit for i = lbound(v) to ubound(v) set sh = worksheets(v(i)) rng = sh.Range(sh.Cells(2,"V"),sh.Cells(rows.count,"V"). End(xlup)) dblsum + Application.Sum(rng) set rng1 = rng.offset(2,0).Resize(1,1) rng1.value = dblsum rng1.NumberFormat = "#,##0.00" Next -- Regards, Tom Ogilvy "GregR" wrote in message oups.com... I have an array of sheets consisting of 8 sheets (not the only sheets in the workbook). I want to sum Col "V" of each sheet in the array, starting in V2:V+lastrow. I also want to perform some formating on the sum, which should be offset by 2 rows from the last row, in each sheet. I need help. TIA Greg |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom, thanks again. I wasn't even close with this one.
Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy an array of Sheets | Excel Discussion (Misc queries) | |||
How to manipulate an 2D Array into a Column Array? | Excel Discussion (Misc queries) | |||
combining cells and array from different sheets into an array to pass to IRR() | Excel Discussion (Misc queries) | |||
Sheets Array | Excel Programming | |||
calculting stats of column array in 3D array | Excel Programming |