Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to link multiple columns to multiple worksheet totals / functi | Excel Worksheet Functions | |||
Counting totals between multiple columns for like items | Excel Worksheet Functions | |||
Always display items AND Include hidden items in totals | Excel Discussion (Misc queries) | |||
Total multiple worksheets into totals worksheet | Excel Worksheet Functions | |||
Summary of Multiple Worksheet Running Sum Totals | Excel Worksheet Functions |