Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
I'm looking for a way to code using VBA a cell's formula to sum every
50th cell (in the same column) to the point it finds a cell with a null value. Any simple way of doing this? Thanks for any assistance! Jason |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
So you want to be able to put in a function so that it will go every 50
cells (from the first cell in that column? or 50 rows down from where the cell that you are putting the formula is located?) and sum it up until it reaches an empty cell. So they would put in a cell: =sum50() And it will return a number. 824 ??? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
If I have a formula in Cell A1 it would sum the cells A51, A101, A151
and so on until it reachs an empty cell. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
Yea but what if the formula is in Cell A2? Is it still A51+A101, or is
it A52+A102? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
If it is always from 50 cells down from where the formula is put in,
then this should work: Function sum50() currentrow = ActiveCell.Row currentcolumn = ActiveCell.Column sumtotal = 0 Do Until IsEmpty(Cells(currentrow + 50, currentcolumn)) sumtotal = Cells(currentrow + 50, currentcolumn).Value + sumtotal currentrow = currentrow + 50 Loop sum50 = sumtotal End Function |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
It's dependant on the cell the formula is in...therefore if in Cell A2
it would be A52+A102 and so on. In the spreadsheet I'm using a summary table at the top of the spreadsheet has a running total of other tables inserted below it (same template used for all). |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with updating formulas
Thanks Chip! I think this function will work well for me.
Jason. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formulas not updating | Excel Worksheet Functions | |||
Formulas not updating | Excel Discussion (Misc queries) | |||
Updating Formulas | Excel Discussion (Misc queries) | |||
Formulas aren't updating | Excel Worksheet Functions | |||
Updating formulas | Excel Worksheet Functions |