Programming A formula

  • Thread starter Thread starter Joseph
  • Start date Start date
J

Joseph

Hi all,

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

cheer
 
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
 
1 way.
Insert a sheet at the front called A and one at the end called Z then

=SUM(A:Z!B2)

R
Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top