Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2023, 12:48 PM
Rog7 Rog7 is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Novice
Use of & to include a cell in a reference to an external Excel table
 
Join Date: Sep 2023
Location: London
Posts: 4
Rog7 is on a distinguished road
Default Use of & to include a cell in a reference to an external Excel table

I have a reference to an Excel table in another sheet, like this:

='Day-Out-17-HYS.xlsx'!TblSmmry[[#Totals],[Date]]



and would like to replace the HYS above with a cell reference such as B17 so that copying this formula to other rows would access different external sheets.

I've tried various combinations of "&B17&" with/without double quotes around the sheet name, but haven't yet found the right way to do this

i.e. ="'Day-Out-17-"&B17&".xlsx'"!TblSmmry[[#Totals],[Date]] and other variations get There is a problem with this formula error.
Reply With Quote
  #2  
Old 09-20-2023, 11:50 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
have a look at the INDIRECT function
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 09-21-2023, 02:18 AM
Rog7 Rog7 is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Novice
Use of & to include a cell in a reference to an external Excel table
 
Join Date: Sep 2023
Location: London
Posts: 4
Rog7 is on a distinguished road
Default

Thanks, that looks as though it could work but I see that INDIRECT needs all the source workbooks to be open.

I currently have over 20 such workbooks, each with 6 worksheets. So I think that's impractical.

Thanks anyway, I'll keep it in mind.
Reply With Quote
  #4  
Old 09-22-2023, 12:39 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

It is not INDIRECT that needs the books to be opened, but the function you use. SUMPRODUCT e.g. will work on closed books even when INDIRECT is used within the function.
As for your formula, perhaps VBA will do the trick, but that is above my pay grade
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 09-22-2023, 04:50 AM
Rog7 Rog7 is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Novice
Use of & to include a cell in a reference to an external Excel table
 
Join Date: Sep 2023
Location: London
Posts: 4
Rog7 is on a distinguished road
Default

I feel I am progressing here, a little.

I can use INDIRECT within SUBTOTAL(105,xxx) to get the results I'm looking for but all the workbooks still need to be open.

Haven't yet figured out how to use SUMPRODUCT to do the same.
Reply With Quote
  #6  
Old 09-22-2023, 11:33 AM
Rog7 Rog7 is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Novice
Use of & to include a cell in a reference to an external Excel table
 
Join Date: Sep 2023
Location: London
Posts: 4
Rog7 is on a distinguished road
Thumbs up

Found a solution:

It took me a few hours to amend all 20+ workbooks to put required data in one particular sheet in each workbook.

Now Power Query can provide the summary report as wanted.
Reply With Quote
  #7  
Old 09-22-2023, 11:23 PM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Use of & to include a cell in a reference to an external Excel table Windows 10 Use of & to include a cell in a reference to an external Excel table Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Nice to see you found a solution.
Please mark thread as solved. Thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of & to include a cell in a reference to an external Excel table When inserting row in table, how do I adjust cell reference to new row Peterson Excel Programming 1 01-16-2022 01:06 PM
Find/Replace a cell with external reference John Moses Excel 1 01-03-2020 05:52 AM
Use of & to include a cell in a reference to an external Excel table Using Cell Values in Active Sheet to Populate Path to External Reference Link wowcrofty Excel 4 12-19-2016 12:29 PM
Use of & to include a cell in a reference to an external Excel table Reference Word Table Cell Using Offset? wlcdo2 Word VBA 2 06-19-2016 08:53 PM
Use of & to include a cell in a reference to an external Excel table Assign the value of a cell as a cell reference of another cell in Excel 2010 - How to? bharathkumarst Excel 7 10-13-2014 10:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft