Thread: dynamic formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default dynamic formula

You can do this with a macro, but why not use dummy hidden sheets as your
first and last sheets? Name them "First" and "Last" and hide them. Any new
sheets that you insert will be between the two hidden sheets. Then the
formula:

SUM(First:Last!A1)

will sum all the A1s no matter how many new sheets you insert.

--

Vasant




"Mark Smith" wrote in message
...
Hi all

I am trying to create a formula that will gather information located on
different worksheets. I am trying to do this dynamically by creating a
macro that will "rebuild" the formula after a new sheet is added.

The data is located in the same cell on each sheet.

I figured that I could write a for next loop that will parse through all

the
work sheets and add the cell to the formula.

I am not a super programmer but I can get by so if someone can point me in
the right direction, I would appriciate it very much

thank You.


--
Mark Smith
SPX Air Gage Co.