Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with updating formulas

Thanks Chip! I think this function will work well for me.
Jason.

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
Formulas not updating Creating a Database in VWD Excel Worksheet Functions 2 April 24th 10 12:42 PM
Formulas not updating T Excel Discussion (Misc queries) 9 October 29th 09 06:02 PM
Updating Formulas JPS Excel Discussion (Misc queries) 2 July 11th 08 08:38 PM
Formulas aren't updating ANTHER Excel Worksheet Functions 2 May 26th 07 06:36 PM
Updating formulas craftcenter Excel Worksheet Functions 3 March 31st 06 12:50 AM


All times are GMT +1. The time now is 07:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"