ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking a several workbooks and worksheets (https://www.excelbanter.com/excel-programming/325934-linking-several-workbooks-worksheets.html)

Justin[_13_]

Linking a several workbooks and worksheets
 
Hi
I am trying to consolidate information from 12 different workbooks
each with 12 worksheets (Jan-Dec) into one 'Group' Workbook (also
split by month). At present I am linking the cells as follow:
=[leisureclub1.xls]January!$F$16
=[leisureclub1.xls]January!$F$17
=[leisureclub1.xls]January!$F$18
=[leisureclub2.xls]January!$F$16
=[leisureclub2.xls]January!$F$17
and so on. this is very time consuming. Is there any way i can specify
the worksheet refernce from a cell in my consolidated spreadsheet i.e
=[leisureclub1.xls]"cell A1"!$F$16
=[leisureclub1.xls]"cell A1"!$F$17
This would save me having to link the cells across each of the 12
worksheets.
i hope this makes sense. I think i have confused myself!
Justin

Tom Ogilvy

Linking a several workbooks and worksheets
 
Sub writeformula()
for each cell in selection
cell.formula = "='[LeisureClub1.xls]" & range("B7").Value & _
"'!" & cell.Address(0,0)
Next
End Sub

would be a guess.

select the cells where you want the formula and run the macro.

--
Regards,
Tom Ogilvy

"Justin" wrote in message
om...
Hi
I am trying to consolidate information from 12 different workbooks
each with 12 worksheets (Jan-Dec) into one 'Group' Workbook (also
split by month). At present I am linking the cells as follow:
=[leisureclub1.xls]January!$F$16
=[leisureclub1.xls]January!$F$17
=[leisureclub1.xls]January!$F$18
=[leisureclub2.xls]January!$F$16
=[leisureclub2.xls]January!$F$17
and so on. this is very time consuming. Is there any way i can specify
the worksheet refernce from a cell in my consolidated spreadsheet i.e
=[leisureclub1.xls]"cell A1"!$F$16
=[leisureclub1.xls]"cell A1"!$F$17
This would save me having to link the cells across each of the 12
worksheets.
i hope this makes sense. I think i have confused myself!
Justin




Dave Peterson[_5_]

Linking a several workbooks and worksheets
 
You got a response at your first post.

Justin wrote:

Hi
I am trying to consolidate information from 12 different workbooks
each with 12 worksheets (Jan-Dec) into one 'Group' Workbook (also
split by month). At present I am linking the cells as follow:
=[leisureclub1.xls]January!$F$16
=[leisureclub1.xls]January!$F$17
=[leisureclub1.xls]January!$F$18
=[leisureclub2.xls]January!$F$16
=[leisureclub2.xls]January!$F$17
and so on. this is very time consuming. Is there any way i can specify
the worksheet refernce from a cell in my consolidated spreadsheet i.e
=[leisureclub1.xls]"cell A1"!$F$16
=[leisureclub1.xls]"cell A1"!$F$17
This would save me having to link the cells across each of the 12
worksheets.
i hope this makes sense. I think i have confused myself!
Justin


--

Dave Peterson


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

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