Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Insert Grand total at the end

Hi, I am inserting grand total at the end of the result, which is
return by a query. I need to calculate from row 49. Its calculating
fine except for at L49 cell which is the first cell...its showing
total twice i.e. if the last row is 70...the total is shown at L71 and
L72...any idea what is wrong in the code??

Lastrowa = Range("b65536").End(xlUp).Row

Range("l49").End(xlDown).Offset(1, 0).Value = _
"=SUM(l49:l" & Range("l49").End(xlDown).Row & ")"

Set desti = Range("l" & Lastrowa + 1 & ":bo" & Lastrowa + 1)
Range("l" & Lastrowa + 1).Copy desti

Thanks
Payal
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Insert Grand total at the end

Hi

I've just built your code into a clean book - and your code works fine - placing the total once at the bottom of column L and then copying it to the right to column B

So - either you are using Excel 97, you are hitting the macro button twice, your code is inside a loop or the total is coming in from the import routine..


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
Duplicate Running Total Grand Total In Pivot Table Mathew P Bennett[_2_] Excel Discussion (Misc queries) 1 August 17th 08 03:13 AM
Excel 2002 : Any single button to get sub total and grand total ? Mr. Low Excel Discussion (Misc queries) 2 May 22nd 07 08:46 AM
Pivots - Auto calc % Sub total is of grand total VBA Noob Excel Discussion (Misc queries) 3 August 8th 06 08:46 PM
Adding Data Using Multiple Worksheets to Total into a Grand Total Lillie Excel Worksheet Functions 1 April 19th 05 08:34 PM
Change Word Total and Grand Total Indu Aronson Excel Programming 2 February 16th 04 07:02 PM


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