Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sum row totals for multiple items in a worksheet

How do I add all the numbers above a cell using generic range references and
then be able to move down the column and repeat the Sum function for all
records in the worksheet? There are way too many to do each manually. I can
get the macro to go to the cells where I want the Sum Totals but don't know
the code to "sum up" the values above that cell. I'v tryed the xlUp etc but
it gives me specific ranges each time. Suggestions are much appreciated.
--
Mickey
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,104
Default Sum row totals for multiple items in a worksheet

I am not clear on the question. Would you like to elaborate?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Mikey" wrote in message
...
How do I add all the numbers above a cell using generic range references
and
then be able to move down the column and repeat the Sum function for all
records in the worksheet? There are way too many to do each manually. I
can
get the macro to go to the cells where I want the Sum Totals but don't
know
the code to "sum up" the values above that cell. I'v tryed the xlUp etc
but
it gives me specific ranges each time. Suggestions are much appreciated.
--
Mickey



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sum row totals for multiple items in a worksheet

I have expenses for numerous wells in a spreadsheet. There are many other
items included that are not expneses. I have a "Category" column to identify
the Expense rows with a Total line below them. I want to Total the expenses
for each well and move down the rows to the next Total line then sum all the
expenses above it. I can get my macro to goto the cell where I want the
total but don't have the skill set to produce a Sum function that adds as
many lines above the cell until it hits a blank cell at the top of the data
in the column. This is what I have that shows specific ranges (K14:K53) with
the Total for the cells in K53 and I need to have generic ones so I can
repeat the Sum formula for each well. There are different numbers of expense
rows for each well.

Range(Selection, Selection.End(xlUp)).Select
Range(Selection, Selection.End(xlUp)).Select
Range("W14:W53").Select
Range("W53").Activate
ActiveCell.FormulaR1C1 = "=SUM(R[-39]C:R[-1]C)"
Range("W14:W53").Select
Range("W53").Activate The formula gives the total in this cell
--
Mickey


"Bernard Liengme" wrote:

I am not clear on the question. Would you like to elaborate?
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Mikey" wrote in message
...
How do I add all the numbers above a cell using generic range references
and
then be able to move down the column and repeat the Sum function for all
records in the worksheet? There are way too many to do each manually. I
can
get the macro to go to the cells where I want the Sum Totals but don't
know
the code to "sum up" the values above that cell. I'v tryed the xlUp etc
but
it gives me specific ranges each time. Suggestions are much appreciated.
--
Mickey




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
how to link multiple columns to multiple worksheet totals / functi Chieftan Excel Worksheet Functions 4 June 23rd 09 10:11 PM
Counting totals between multiple columns for like items Bernie R. Excel Worksheet Functions 9 February 14th 08 11:40 PM
Always display items AND Include hidden items in totals Ted M H Excel Discussion (Misc queries) 0 November 6th 07 09:47 PM
Total multiple worksheets into totals worksheet David Excel Worksheet Functions 1 January 31st 07 08:16 PM
Summary of Multiple Worksheet Running Sum Totals karstens Excel Worksheet Functions 4 March 22nd 06 03:37 PM


All times are GMT +1. The time now is 05:35 AM.

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"