ExcelBanter

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

Joseph[_41_]

Programming A formula
 

Hi all,

I need to be able to sum one cell (B2) in 231 sheets programmatically
Any ideas?

cheer

--
Josep

-----------------------------------------------------------------------
Joseph's Profile: http://www.excelforum.com/member.php...nfo&userid=563
View this thread: http://www.excelforum.com/showthread.php?threadid=26425


Bernie Deitrick

Programming A formula
 
Joseph,

If the 231 sheets are all the sheets that are in the workbook:

MsgBox Evaluate("=Sum('" & Worksheets(1).Name & ":" &
Worksheets(Worksheets.Count).Name & "'!B2)")

Otherwise, you will need to change how the formula is structured, or do a
loop....

HTH,
Bernie
MS Excel MVP

"Joseph" wrote in message
...

Hi all,

I need to be able to sum one cell (B2) in 231 sheets programmatically.
Any ideas?

cheers


--
Joseph


------------------------------------------------------------------------
Joseph's Profile:

http://www.excelforum.com/member.php...fo&userid=5637
View this thread: http://www.excelforum.com/showthread...hreadid=264258




OZDOC1050[_3_]

Programming A formula
 
1 way.
Insert a sheet at the front called A and one at the end called Z then

=SUM(A:Z!B2)

R
Pete
--
(][ This Email has been scanned by Norton AntiVirus. ][)

"Joseph" wrote in message
...

Hi all,

I need to be able to sum one cell (B2) in 231 sheets programmatically.
Any ideas?

cheers


--
Joseph


------------------------------------------------------------------------
Joseph's Profile:

http://www.excelforum.com/member.php...fo&userid=5637
View this thread: http://www.excelforum.com/showthread...hreadid=264258





All times are GMT +1. The time now is 05:24 PM.

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