Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Sum Column on Array of sheets

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Sum Column on Array of sheets

Tom, thanks again. I wasn't even close with this one.

Greg

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy an array of Sheets Aussiegirlone Excel Discussion (Misc queries) 4 July 12th 09 06:41 AM
How to manipulate an 2D Array into a Column Array? Joe Excel Discussion (Misc queries) 3 April 16th 07 06:30 PM
combining cells and array from different sheets into an array to pass to IRR() [email protected] Excel Discussion (Misc queries) 3 September 11th 06 07:17 AM
Sheets Array Dave Excel Programming 2 August 12th 04 10:39 AM
calculting stats of column array in 3D array [email protected] Excel Programming 0 February 4th 04 11:27 PM


All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"