How does referencing cells in another workbook work?

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
788
Office Version
  1. 365
Platform
  1. Windows
Hi,
Just want an understanding on how excel pulls values from another workbook when you reference in a formula like this:

Code:
=SUM(D:\Reports\[Sales.xlsx]Jan!B2:B5)

As on our network drive at work, a 30mb spreadsheet would be fairly slow to open, yet you can pull values from it almost instantly with the formula.
 
Last edited:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
a 30mb spreadsheet would be fairly slow to open, yet you can pull values from it almost instantly with the formula

Yes, but the values in the workbook containing the linked formulas only get updated under certain conditions, e.g.

1) You click the Update button when opening the workbook;
2) You force the values to be updated, via Data --> Edit Links --> Update Values;
3) You enable automatic update of links on startup; or
4) The linked workbook is open at the same time (and in the same Excel instance pre-2013 version).
 
Last edited:
Upvote 0
Yes, but the values in the workbook containing the linked formulas only get updated under certain conditions, e.g.

1) You click the Update button when opening the workbook;
2) You force the values to be updated, via Data --> Edit Links --> Update Values;
3) You enable automatic update of links on startup; or
4) The linked workbook is open at the same time (and in the same Excel instance pre-2013 version).

Can't you just delete the formulas and re add them with VBA?
 
Upvote 0
Not sure I see your point... If you delete and re-add the formulas, you're still restricted by the same items above.

sorry if i wasn't clear but if for example i run the following macro:
Code:
Sub Macro2()
Dim Sht As String


Sht = Range("Z1")


    Range("A2:B1000").Cells.ClearContents
    
    Range("A2").FormulaR1C1 = "='C:\test\[mytest.xlsb]" & Sht & "'!R[4]C21"
    Range("A2").AutoFill Destination:=Range("A2:A1000"), Type:=xlFillDefault
    
    Range("B2").FormulaR1C1 = "='C:\test\[mytest.xlsb]" & Sht & "'!R[4]C18"
    Range("B2").AutoFill Destination:=Range("B2:B1000"), Type:=xlFillDefault


    Range("A2:B1000").Value2 = Range("A2:B1000").Value2
End Sub

it instantly grabs the values a lot quicker than opening the workbook to view them, im guessing excel can load them differently.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top