Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Copy formula

Copy formula

Copy formula

Hi all,

Just wondering if anybody knows an easy way of copying formula across a sheet, which has links to other sheets in the workbook.

What I have is a summry page, which links sub totals from ohter sheets. What I would like to do is copy this to the cell next door, but have the sheet reference change, i.e cell A1 = subtotal of cell A2 from sheet2 - then copy this to cell B1 = subtotal of cell A2 from sheet3.

Any ideas of how (or if) this can be done.

At present I have to manullay change the sheet reference which can be very time consuming if there are 30-40 sheets.

Thanks in advance

RE: Copy formula

If this is repetitive, you can create a macro.


RE: Copy formula

There is a way to reference sheet names indirectly. I can't remember how exactly, it needed a bit of lateral thinking.


Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Copy formula

Let's try this again . . .

You can use indirect addressing, but you'll need to create another row to generate the sheet names.  Assuming that the sheets retain Excel's default naming scheme, write the first formula in cell A2 and copy it across as required.  The column(A1) function will take the drudgery out of indexing the sheet number.  Then write the second formula in cell A3 and copy this as required.  The "$A$2" part of this formula is, of course, the common cell address for the subtotals in the sheets, so absolute referencing of at least the column letter is necessary here.  I'd avoid putting either formula in the row that the column() function in the first formula refers to, just to avoid possible circular reference issues.



A similar technique can be used to grab data from several completely separate workbooks, although I think all the workbooks would need to be open.


RE: Copy formula

Note that the "A1" COLUMN(A1) in the first formula will result in the first result (in cell A3) being read from Sheet1, and is appropriate if the summary is being written in the last sheet of the workbook rather than the first.  If your summary is on Sheet1 and the subtotal data sheets start at Sheet2, cell A2 should instead read in part COLUMN(B1); or COLUMN(C1) if the subtotals start in Sheet3, etc.


RE: Copy formula

Cheers NormPeterson. This works a treat.

RE: Copy formula

Just to add to NormPaterson's.

I have a formula (from a previous question of mine) that calls up the worksheet name. This being:


However this only refers to the current worksheet name, is there any way this can be put on say Sheet1, to reference the name of Sheet2, Sheet3 etc. This would elimate (in around about ways) of the first formula in Norms post, and would enable the renaiming of worksheets?


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close