LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Generate Subtotal Summary from Sheet1 into Sheet2

Last stretch...
the above code works perfect.
Now, I am trying Rows Total and Columns Totals
....
....
Loop
End With
SH2.Select
SH2.Cells(k, "A") = "Grand Total": Rows("1:1").Font.Bold = True:
Range("B1:D1").HorizontalAlignment = xlRight
'Place row totals in Column D. Reference Error there
-----------------------------------------------------------------------------
For i = 2 To k
'SH2.Cells(i, "D").Value = Application.Sum(Range(Cells(i, "B"),
Cells(i, "C")))
Next i
'Place Columns totals in row k.
-------------------------------------------
For i = 2 To 4
SH2.Cells(k, i).Value = Application.Sum(Range(Cells(2, i), Cells(k,
i)))
Next i
Row(k).Font.Bold = True ' Error . How do I refer to the whole row with
a variable ?
Exit Sub


 
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
sheet2 = sheet1 DA[_2_] Excel Programming 4 April 12th 10 09:14 PM
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
A1 Sheet2 is linked to A1 sheet1 so that user enters value(abc123) a1 sheet1 and A1 sheet2 is updated pano[_3_] Excel Programming 2 October 28th 07 02:32 PM
how do copy "sheet1!A1+1 in sheet2 to sheet 3 and get "sheet2!A1+ Dany Excel Discussion (Misc queries) 5 April 16th 07 03:27 AM
[=Sheet1!A1] - if i use Column A1 ('Sheet1') / A2 ('Sheet2') Lawrence C H Tan Excel Worksheet Functions 0 January 19th 07 08:29 PM


All times are GMT +1. The time now is 02:31 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"