ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dynamic formula (https://www.excelbanter.com/excel-programming/293455-dynamic-formula.html)

Mark Smith

dynamic formula
 
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.




Vasant Nanavati

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.






Mark Smith

dynamic formula
 
THANK YOU!!!!

That was very easy.


--
Mark Smith
SPX Air Gage Co.


"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
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.








Vasant Nanavati

dynamic formula
 
You're most welcome! :-)

--

Vasant


"Mark Smith" wrote in message
...
THANK YOU!!!!

That was very easy.


--
Mark Smith
SPX Air Gage Co.


"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
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.











All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com