Creating External Reference With Variable?
Feb 27, 2014
I'm wondering if there's any way to put a variable for a cell address in an external reference formula. Basically, I'm creating an abridged report of customer data that takes a single customer's info from 2 other workbooks on a networked drive and compiles the chosen cell data into one worksheet summary of their info. The base external reference formula looks like this:
='F:Projects[CustomerDB.xls]Sheet1'!VariableCellGoesHere
I want to know if there's a way I can make the formula use a variable cell address that I can just type into another cell to tell it which row I need to grab info from. Generally, all of the customer data I need is spanned across multiple columns in one single row. The formula above appears multiple times in the sheet I'm trying to make. The first is for "Name", the next is for "Address", next is "Phone Number", etc. So for instance, if I want customer data from the main spreadsheet and that customer's info is on row 355, my first few formulas are:
='F:Projects[ProjectDB.xls]Sheet1'!$A$355
='F:Projects[ProjectDB.xls]Sheet1'!$B$355
='F:Projects[ProjectDB.xls]Sheet1'!$C$355
Is there a way I can maybe have a designated cell where I just enter the row number I need (e.g. 481) so the formula sees that number and plugs it into the cell reference above resulting in the formulas adjusting themselves to ='F:Projects[ProjectDB.xls]Sheet1'!$A$481?
View 9 Replies
ADVERTISEMENT
Apr 10, 2013
I am working on a research project of which details cannot be disclosed. I basically have many worksheets which each contain 3D positional data and I am plotting overlaid graphs using multiple worksheets. I have gotten them to work where I manually enter the names of the worksheets, but I am trying to use the CELL("filename") command to get the current worksheet's name, then using a substitute command to change certain fields, then I would like to use the string name created by those functions to call a global variable in another worksheet which defines a range. I will try to give an example.
Say I have 3 worksheets for arbitrary measurements:
1) filename 1mm
2) filename 2mm
3) filename 3mm
I would like to graph all 3 sets of data in worksheet "filename 1mm", using the fact that everything in the filenames are the same except for the 1/2/3mm part. I have a template of which I will be copy/pasting data from numerous data sets and then each worksheet has defined names "X_vals" and "Y_vals" which give me dynamic ranges for the data I wish to plot from that worksheet.
When I type the names manually--i.e. " 'filename 2mm'!X_vals" everything works fine, but when I try to create the exact same string dynamically using indirect/substitute/left/right etc, it does not let me do it. I am able to create a dynamic string with a range, such as " 'filename 2mm'!C10:C100" but then when I change it to " 'filename 2mm!X_vals" it just gives me #REF!.
I guess my question is just is there any way to use the indirect function to create a string name dynamically which references a defined name in another worksheet? If not possible with just simple excel functions, is there a way to do this with a macro? I am not exactly familiar with VBA in excel, though I know how to run macros.
View 3 Replies
View Related
Jun 29, 2006
I'd like to assign a value located in a cell in a workbook to a variable in a VBA program in another workbook. I do NOT want to open the workbook that contains the cell with the value. I can't get the hang of referencing an external cell reference. Let's say there's a value in a cell named "nbr" in a workbook named "tst.xls" located in a path "c: est" that I want to assign to a variable "tstnbr" in a VBA program, what is the best way to code that?
View 8 Replies
View Related
Mar 7, 2012
I have VBA code that creates three reports based on fields a user chooses. When the user clicks the button to create the first report, links are built to the files which contain the fields they chose. There are approximately 15 files that need to be linked in every report.
When the links are built, referencing the external files, the system is extremely slow.
I have Application.ScreenUpdating = False and Application.Calculation = xlCalculationManual.
Despite these settings, the links pull in updated values.
Also, to create the last two files, I do a FIND/REPLACE to change the cells referenced in the links, causing it to choke.
would get the links in place without updating each one as it is created?
View 1 Replies
View Related
Feb 5, 2008
I have a list of objects in column A
I want to select that list or part of it then run a VB module that references each item in the selection and compares it to a master list in a separate workbook that contains both the object and an additional value, and display that additional value in column B of the original workbook against each object in column A
View 9 Replies
View Related
Dec 14, 2009
I'm having trouble working this around, i use the following code in one of my Workbook sheets.
View 10 Replies
View Related
Dec 5, 2012
When I open my Excel workbook, I get the following error:
Removed Feature: External formula reference from /xl/externalLinks/externalLink1.xml part (Cached values from external formula reference)
I am asked if I want to recover the contents of the file.
View 1 Replies
View Related
Mar 16, 2008
I need to create a formula or code which will return the value of cell d16 from an external and unopened workbook, where that external workbook's file name, directory and sheet names are provided within cells (able to be updated) of the current workbook. I have downloaded the add-in for INDIRECT.EXT but either being unfamiliar with this function or that I'm barking up the wrong tree all I'm getting is #REF!
And to add to my problem, I was hoping to use this formula / code within an excel table embedded in a word document.
View 9 Replies
View Related
May 16, 2013
Is there a way to specify the filename for an external workbook that can be referenced throughout the spreadsheet? In my case it would be better if I could change the single reference instead of having to change it throughout the entire spreadsheet everytime I needed to use data from a different file.
View 2 Replies
View Related
Nov 24, 2011
I've got a field where I enter the current month, from this I derive a file path which is stored in A4.
ie: A1 = '01/11/2011' (UK Date format)
A4 = '\myserverdirectory20111111MyFile.xls'
What I'm trying to achieve is to then have a link in cell A6 that will link to the file in A4. I can specify my cell reference as this will never change, just the file path.
So, if I changed A1 to '01/12/2011' my A4 changes to '\myserverdirectory20111211MyFile.xls'
I'm trying to set A6 to something like ="&$A$A4&"!B1 to get the value of B1 on my referenced sheet.
View 1 Replies
View Related
Apr 2, 2007
I am building a summary spreadsheet which will bring in a number of values from other spreadsheets located in folders on a network. Each set of external references will return the same cells, but the location and filenames are different. In order to make it quick and easy to modify the file names and locations without having to change the cell references in my summary sheet i want to type the full reference in a cell as text then use this in another cell as part of the external reference...
View 9 Replies
View Related
Apr 21, 2008
I am designing a spreadsheet at work, and need a little assitance. I can't find the answer I need online or here either. Here's the problem: I want to be able to enter data (A 5 digit job number, 80227 for example) into a cell, and then multiple other cells would auto fill with data from outside worksheets. The worksheets are in a seperate folder on my server and named under the same name as the project. (So if I entered 80227 as the data in A1, I would want A2, A3 and A4 to open spreadsheet 80227.xls on the server, locate the referenced cell/s, and insert the info from 80227 into them.)
I can easily reference the cells alone and have them input the data, but this is extremely time consuming since this spreadsheet has all the current jobs our company is working on. I currently am running a macro/VBA that automatically updates all linked spreadsheets without them having to be open, so that is not an issue.
View 3 Replies
View Related
Feb 24, 2014
I currently have a file that is linked to an external workbook that is referencing a certain cell from a certain tab. The below is what Column A & B look like right now. What I'm wanting to know is is there a way to have the formula in Column B automatically reference the name in Column A (which is the tab name in the external workbook) instead of having to manually change the formula when the value in Column A changes?
In other words, I want everything in the external reference formula to remain the same except have the person's name change dynamically...
Mary
='X:Anderson CorporationEmployees[Work Hours]Mary'!$F$42
Joe
='X:Anderson CorporationEmployees[Work Hours]Joe'!$F$42
Frank
='X:Anderson CorporationEmployees[Work Hours]Frank'!$F$42
Michelle
='X:Anderson CorporationEmployees[Work Hours]Michelle'!$F$42
Sam
='X:Anderson CorporationEmployees[Work Hours]Sam'!$F$42
View 1 Replies
View Related
Aug 7, 2013
The goal is to have a data validation drop down list that adjusts the File.xls name portion of the external cell reference (example given below) and return the result of the cell I am searching in the new file after updating my links.
I am trying to set up an external cell refence within my workbook for example:
='[File.xls]Tab'!$C$9
When I have tried setting the equation to pull from the drop down list in cel A1 for example:
="'["&A1&"]Tab'!$C$9"
It only shows the new file path name and not the value in the new sheet--even after updating links.
I am also attempting to do this using the my network places file path instead of the letter drive in my computer.
View 2 Replies
View Related
Jun 11, 2008
I have a little boo-boo I need to fix. I have a customer that has about 100 workbooks. I needed to add some functions to them so I made up a new sheet of forms and buttons as well as a series of new macros to bring into these workbooks. I knew I couldn't import the macros, so I added the module containing those by hand to all workbooks. I then imported a master copy of the new sheet from a master file i use to hold my working macros. The problem is the buttons on the new sheeets in each workbook now references the master workbook for the macro name, even though each workbook has the same macro of the same name in itself.
My question is, can I make a macro that will edit all the buttons on a specific named sheet (maintenance is the sheet name) in a workbook and take out the external reference.
For example, instead of the assigned macro pointing to c:master.xls!macro1 i just want it to call macro1. And yes, I can go into them and do it by hand. Do I want to manually edit 100 workbooks for a dozen buttons each? No. I want to automate it if I can. If anyone can help I would greatly appreciate it. It would save me a bunch of time.
View 9 Replies
View Related
Nov 29, 2013
I'm trying to create a VBA macro which will open external workbooks in a specific folder. thes workbooks will have filenames which are identical to the value in cell B1 of my active workbook. Once open, I would use indirect to pull certain results from that external workbook and then close it. I have a separate macro already which runs through the list. I found a few examples online but they don't seem to work.
View 2 Replies
View Related
Jul 1, 2013
I have a formula in a cell which is refered to other cell within the same sheet and also to other sheet from other file. say
C1 = A1+B1+data file c1 Data file is another file in other location.
I was trying to break a external reference link (from Data File) from Data _ Edit Link, but it is converting all the formula to value. How is it possible to break only the external link without damaging the formula within the sheet say c1 = A1+B1+26 (value from data file c1)
View 5 Replies
View Related
Nov 22, 2011
how to change the formula below which is referencing an internal worksheet, to a forumula that will reference an external worksheet that is located in an excel document on the G: Drive.
=SUMPRODUCT(--(1210laradj_v_2009!F2:F65536="HMO-ALT SELECT"),--(ISNUMBER(MATCH(1210laradj_v_2009!AO2:AO65536,{3,5,9,12,37,39,46,47,54,73,74,75,76,77,78},0))))
So what it's doing is totaling the counts in the 1210laradj worksheet that match columns HMO-ALT SELECT as well as the numbers 3,5,9 etc.
Well now these worksheets will be on a seperate excel spreadsheet located on a network drive, so I am trying to figure out how I can fix this.
I tried adding it in like so, but it fails.
=SUMPRODUCT(--('G:ROC-CLAIMSAudit ResultsProvider infomonthly statsReproc'd claims2011ProductionCounts[0111rpt2235_laradj_v.xls]0111laradj_v_2009'!F2:F65536="HMO-ALT SELECT"),--(ISNUMBER(MATCH(1210laradj_v_2009!AO2:AO65536,{3,5,9,12,37,39,46,47,54,73,74,75,76,77,78},0))))
View 6 Replies
View Related
May 27, 2014
I have the following formula in my workbook:
=COUNTIF('\caltulfs1DATAProjectsF2014FB-979916 - EQUATE7.0 DOCUMENTATION7.01 DOCUMENT REQUIREMENTS & RECORDS[FB-979916 DSI FORM.xlsm]Customer Tracking'!A12:A86,"past due")
When I open the master file I want my links to automatically update and open the referenced files without having to open the source document for each value. Can this be done
View 3 Replies
View Related
Jul 7, 2009
Cell F9 looks at D9. If there is no value, I would like it to return "", if there is a value, I'd like it to finish the formula.
It figures the formula correctly, providing there is a value in D9.
However, the entire D column is referencing cells from another workbook.
So while no value shows up, if you click on an empty cell in D9 it says:
='C:Workbooks[EnterMenu.xls]Enter Menu Items Here'!D5
How can I get Excel to see 'visually' empty cells in the D column as empty when it seems Excel is reading the cell value as a reference path.
However, that diagnoses might be wrong, since if there is a value there, it figures the formula using the value and pays no attention to the reference path.
This is the formula I'm using currently:
=IF(D9=0,"", IF(N(H9),H9/D9,G9/D9))
View 2 Replies
View Related
Jul 27, 2009
how to achieve what I'll call "parameter driven" code where the "parameters" are variable names.
For example, in the following code... I'm looking for an answer to the question posed...
Sub Test_Sub()
Dim vX, vY, z
vX = 10
vY = "vX"
For z = 1 To 3
'This next line generates a Run-time error... But...
'=====================================
MsgBox z * vY '
View 9 Replies
View Related
Aug 14, 2006
I have the following formula in cell L51 of all sheets calculating the volume depending on the monthly index that is chosen from the drop down menu in a particular sheet. =If(MIndex=0, SUM(D33:L50),If(MIndex=1,SUM(D34:L50),If(MIndex=2,SUM(D35:L50), 0))). I am getting the following message and I do not understand what it is about.
Microsoft Office Excel cannot calculate a formula. Cell references in the formula refer to the formula's result, creating a circular reference. Try one of the following
View 3 Replies
View Related
Feb 6, 2014
I am running an ordering sheet that I need to attach reference numbers to, no format for the reference number has been determined.as yet. I need this reference number to change when the 5 digit number changes, see example attached.
Capture.jpg
View 11 Replies
View Related
Oct 19, 2009
Is there a way to generically reference a directory when creating a hyperlink? By this I mean, I have an XLS that documents the flow of a process. As an outcome of this process, text files are generated.
This process may be run multiple times. I would like to be able to create multiple directories: Run1, Run2, Run3, ...
I would like to put a copy of the XLS in each directory. I would like to put the output files from each run into their respective directory.
I would like to put hyperlinks in the XLS that point to the flat files. However, when I add a hyperlink it contains the full directory path. Something like C:MyDocumentsRun1output1.txt.
So, if I copy the XLS into directory Run2, the hyperlink is still going to point to a data file in directory Run1.
How can I generically default to look in the 'current' directory for a file? Or is there a different/better way around this? ............
View 7 Replies
View Related
Jan 23, 2009
I am wondering if anyone as created a what to do word art, using a input variable.I.e in may example I have a person, Suzie Smith who is an Chief Manager, when I box requires her signature, I would like for it eo be imprinted going diagonal across the box. Is this possible?
View 7 Replies
View Related
Jul 14, 2008
Column A will be completely empty.
When an * is inserted into a single cell in column A, that Row number will become the variable in this equation:
=Sheet1!$G$'variable'
i.e. if i put a * in A14, then the formula should read (=Sheet1!$G$14).
View 10 Replies
View Related
May 18, 2013
How would I create a variable range with:
Sheets("output").Cells(I + r, 1):Sheets("output").Cells(I + r, 9)
View 3 Replies
View Related
May 24, 2007
I currently have the below macro:
If Cells(1, 3) = 2 Then
For a = 1 To 336
b = Round(a * 2 + 0.99)
Cells(b + 0, 3) = a
Cells(b + 1, 3) = a
Next a
MsgBox " Cell C1 is not equal to 2"
End If
where the intent is that whatever cell A1 is equal to, that is how many times over it will duplicate a number in consecutive cells before moving to the next number, ie:
1
1
2
2
3
3
etc to 336.
How can I tweak the code so that if I change the data in cell A1 to 9, I don't have to go in and change the macro?
View 9 Replies
View Related
Apr 22, 2014
I am attempting to obtain the last non-empty row in a column of a spreadsheet by using the following formula
=SUMPRODUCT(MAX((A:A<>"")*(ROW(A:A))))
This works fine.
However, I'd like to make it more dynamic and be able to obtain a usable column reference (i.e., the A:A portion of the formula) from a named range (single cell).
View 1 Replies
View Related
Nov 21, 2011
How do you create a reference number to be posted in a userform2 that is opened from an earlier userform1 where you have entered some initialisation data and generated a source reference number. ie set of data has reference X and there will be y items in that set want references in form X01 to Xy (y unlikely to exceed 20). Want to put references 'X01' into the userform2 and cycle through data entry in userform2 from source reference X01 to Xy. (I'm having problems with the transfer from 1 to 2!)
View 2 Replies
View Related