Sum Column on Array of sheets
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
|