ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Totalling the same cell across multiple workbooks (https://www.excelbanter.com/excel-programming/378794-totalling-same-cell-across-multiple-workbooks.html)

[email protected]

Totalling the same cell across multiple workbooks
 
I have a template that contains cells for number of hours worked in
several rows and columns. I have many copies of this workbook, one for
each employee. I would like to be able to add the cell C3 (for example)
across all of the workbooks that I select...basically merging them all.
Is there an easy way to do this. I spent an hour searching this forum
using different keywords and haven't found a solution yet. Thanks in
advance for any help you can give.

Jeff Wilson


somethinglikeant

Totalling the same cell across multiple workbooks
 
Would simply creating a formula work for you.

=C3(in JohnSmith.xls) +C3(...)+ ... + etc....

This would create links to all of your workbooks if stored in the same
place.

Need a bit more detail to get any smarter on this.


Don Guillett

Totalling the same cell across multiple workbooks
 
=sum(firstsheet:lastsheet!c3)
To do the same for "selected" would require a macro

Sub sumselectedsheets()
On Error Resume Next
For Each sh In Windows(1).SelectedSheets
ms = ms + sh.Range("c3")
Next
MsgBox ms
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
I have a template that contains cells for number of hours worked in
several rows and columns. I have many copies of this workbook, one for
each employee. I would like to be able to add the cell C3 (for example)
across all of the workbooks that I select...basically merging them all.
Is there an easy way to do this. I spent an hour searching this forum
using different keywords and haven't found a solution yet. Thanks in
advance for any help you can give.

Jeff Wilson




[email protected]

Totalling the same cell across multiple workbooks
 
Thanks, but this looks like it is for several sheets WITHIN a workbook.
I am talking about the same named sheet in different workbooks.

Don Guillett wrote:
=sum(firstsheet:lastsheet!c3)
To do the same for "selected" would require a macro

Sub sumselectedsheets()
On Error Resume Next
For Each sh In Windows(1).SelectedSheets
ms = ms + sh.Range("c3")
Next
MsgBox ms
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
I have a template that contains cells for number of hours worked in
several rows and columns. I have many copies of this workbook, one for
each employee. I would like to be able to add the cell C3 (for example)
across all of the workbooks that I select...basically merging them all.
Is there an easy way to do this. I spent an hour searching this forum
using different keywords and haven't found a solution yet. Thanks in
advance for any help you can give.

Jeff Wilson



[email protected]

Totalling the same cell across multiple workbooks
 
This would work, so thank you. But I was hoping to not have to
hardcode in all of the file names. I was hoping to open a bunch and
then run a macro that adds up the cells from all open workbooks. Do you
think that is possible?

Thanks again for the input...

Jeff

somethinglikeant wrote:
Would simply creating a formula work for you.

=C3(in JohnSmith.xls) +C3(...)+ ... + etc....

This would create links to all of your workbooks if stored in the same
place.

Need a bit more detail to get any smarter on this.



Tom Ogilvy

Totalling the same cell across multiple workbooks
 
This isn't exactly what you want, but might be better than what you asked:

consodidate workbooks
http://www.rondebruin.nl/copy3.htm

--
Regards,
Tom Ogilvy


wrote in message
ups.com...
Thanks, but this looks like it is for several sheets WITHIN a workbook.
I am talking about the same named sheet in different workbooks.

Don Guillett wrote:
=sum(firstsheet:lastsheet!c3)
To do the same for "selected" would require a macro

Sub sumselectedsheets()
On Error Resume Next
For Each sh In Windows(1).SelectedSheets
ms = ms + sh.Range("c3")
Next
MsgBox ms
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
I have a template that contains cells for number of hours worked in
several rows and columns. I have many copies of this workbook, one for
each employee. I would like to be able to add the cell C3 (for example)
across all of the workbooks that I select...basically merging them all.
Is there an easy way to do this. I spent an hour searching this forum
using different keywords and haven't found a solution yet. Thanks in
advance for any help you can give.

Jeff Wilson





Tom Ogilvy

Totalling the same cell across multiple workbooks
 
Also look at Data=Consolidate

--
Regards,
Tom Ogilvy


wrote in message
ups.com...
Thanks, but this looks like it is for several sheets WITHIN a workbook.
I am talking about the same named sheet in different workbooks.

Don Guillett wrote:
=sum(firstsheet:lastsheet!c3)
To do the same for "selected" would require a macro

Sub sumselectedsheets()
On Error Resume Next
For Each sh In Windows(1).SelectedSheets
ms = ms + sh.Range("c3")
Next
MsgBox ms
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
I have a template that contains cells for number of hours worked in
several rows and columns. I have many copies of this workbook, one for
each employee. I would like to be able to add the cell C3 (for example)
across all of the workbooks that I select...basically merging them all.
Is there an easy way to do this. I spent an hour searching this forum
using different keywords and haven't found a solution yet. Thanks in
advance for any help you can give.

Jeff Wilson






All times are GMT +1. The time now is 02:12 PM.

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