Pulling info from multiple worksheet tabs?

G

Guest

I have a summary page that pulls from multiple worksheet tabs, call them 1, 2
and 3. On the summary page I want to sum specific cells on a tab, say cell
a1,a2,a3. Can I on the summary sheet make a formula that will sum those
cells, but be flexible enough to recognize what tab I want summed by
referencing another cell on the summary page? In other words if I put 1 in
cell a1 on the summary sheet it will know to go to worksheet 1 and sum the
right cells, and if I put 2 in A1 it will know to sum those cells on
worksheet 2?
 
P

Pete_UK

Try this in your summary sheet:

=IF(OR(A1<1,A1>3),"",SUM(INDIRECT("Sheet"&INT(A1)&"!A1:A3")))

where A1 on the summary sheet is used to hold 1, 2 or 3, and depending
on this value the sum will be returned from cells on Sheet1, Sheet2 or
Sheet3. If A1 is out of range then you will have a blank result.

Hope this helps.

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

Top