• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

How do I get data from a closed workbook A and use it in workbook B and if A is updated so is B?|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / How do I get data from a closed workbook A and use it in workbook B and if A is updated so is B?|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…How do I get data from a closed wor…
sp_PrintTopic sp_TopicIcon
How do I get data from a closed workbook A and use it in workbook B and if A is updated so is B?
Avatar
David Wells
Member
Members
Level 0
Forum Posts: 9
Member Since:
October 30, 2018
sp_UserOfflineSmall Offline
1
November 11, 2018 - 7:35 am
sp_Permalink sp_Print

Hi I am new to this forum and haven't done Excel seriously for a number of years. So need some help and advice please for the best way of doing this.

I have several workbooks that have data in which I want to copy to another workbook so it is all in one workbook. So lets say Workbooks A to J have the data and Workbook Data is where I want the data to go.

In Workbook Data I have four cellls with a SUMIF functions, per row, for the results to go in to. The problem is I don't want to open Workbooks A to J to get the data for Workbook Data. Can this be done. Then I need to do the same thing for workbooks B to J.

In my example spreadsheets it works perfectly if you open the Worksheets A to J and then open Workbook Data and click the Update option when you open it. But if the other workbooks are not open the the cells all have #VALUE! in them.

All the files on my computer are at this location F:\Backup\BST Excel\Risk\

Any help would be appreciated.

Dave

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
2
November 11, 2018 - 11:32 am
sp_Permalink sp_Print

Hi,

My recommendation is to use Power Query, but below answer is how to reference using a formula.

To reference to a range in another workbook you write like below example.

[Workbook-A.xlsx]WBA!B1:B10

So if you want to use SUMIF function you just wrap the reference inside the brackets.

=SUMIF([Workbook-A.xls]WBA!D4:D11,5,[Workbook-A.xlsx]WBA!B4:B11)

/Anders

Avatar
David Wells
Member
Members
Level 0
Forum Posts: 9
Member Since:
October 30, 2018
sp_UserOfflineSmall Offline
3
November 11, 2018 - 7:09 pm
sp_Permalink sp_Print

Thanks Anders

That is the formula I have and if the workbook is open that works but can I use a formula when the workbooks are closed so I don’t have to open all 12 of them.

Dave

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
November 12, 2018 - 3:58 pm
sp_Permalink sp_Print

Hello,

Please try with adding the full path to the file.

=SUMIF('F:\Backup\BST Excel\Risk\[Workbook-A.xlsx]WBA'!D4:D11,5,'F:\Backup\BST Excel\Risk\[Workbook-A.xlsx]WBA'!B4:B11)

You can find more info about external reference here.

https://support.office.com/en-us/article/create-an-external-reference-link-to-a-cell-range-in-another-workbook-c98d1803-dd75-4668-ac6a-d7cca2a9b95f

/Anders

Avatar
Blanka Blair
Member
Members
Level 0
Forum Posts: 53
Member Since:
October 17, 2015
sp_UserOfflineSmall Offline
5
November 13, 2018 - 1:51 am
sp_Permalink sp_Print

Dave,

 

If you want to go the Power Query route as Anders suggested - see the attached workbook.

I built the query pointing to a folder on my network and they changed it to your folder path, so I am no longer able to refresh it. However, you'll just need to refresh the query once you open the file and it should work as long as your underlying files are stored in the folder that you gave in your question.

With Power Query you don't need the underlying files to be opened.

 

Blanka

Avatar
David Wells
Member
Members
Level 0
Forum Posts: 9
Member Since:
October 30, 2018
sp_UserOfflineSmall Offline
6
November 14, 2018 - 8:03 am
sp_Permalink sp_Print

Thanks Blanka

But this didn't do anything I opened it in Excel and saw all the #Value! in all the cells and the formula in the cell were like this

=SUMIF('https://www.myonlinetraininghub.com/wp-content/sp-resources/forum-file-uploads/58davew/2018/11/[Workbook A.xlsx]WBA'!$D$4:$D$11,D3,'https://www.myonlinetraininghub.com/wp-content/sp-resources/forum-file-uploads/58davew/2018/11/[Workbook A.xlsx]WBA'!$C$4:$C$11)

I clicked on refresh all data and get errors.

How does Power Query work as I have never heard of it before?

Dave

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
7
November 15, 2018 - 7:17 am
sp_Permalink sp_Print

Hi David,

In the blog section you can search for Power Query and you will find good information and examples on how to work with that tool. https://www.myonlinetraininghu.....ower-query <-- is one of many.

/Anders

Avatar
Blanka Blair
Member
Members
Level 0
Forum Posts: 53
Member Since:
October 17, 2015
sp_UserOfflineSmall Offline
8
November 15, 2018 - 10:39 am
sp_Permalink sp_Print

David,

 

The Power Query output is in columns K through O. I did not touch the formulas in your original file. All the cells had the #Value! error at my end, too.

If you don't like the layout that Power Query spits out, you can enter formulas in your original table pointing to Power Query table.

The beautiful thing about Power Query is that if you add more files to your folder or if you change values in your existing files and then you refresh Power Query, you will get updated values in your Workbook-Data worksheet.

Mynda has an excellent Power Query course. I took a while ago and it changed my professional life.

Good luck!

Blanka

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Aislinn Mellamphy, Lynnette Altomari, Roy Lutke, Dieneba NDIAYE, Tucker Oakley
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Sopi Yuniarti
sandra parker
LAFONSO HERNANDEZ
Hayden Hao
Angela chen
Sean Moore
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Forum Stats:
Groups: 3
Forums: 24
Topics: 6214
Posts: 27243

 

Member Stats:
Guest Posters: 49
Members: 31894
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.