Referring To A Sheet In An External Workbook By Position, Not Name

Oct 26, 2008

I'm trying to summarize some data from an external workbook. The problem is that the worksheet names there are months (Jan2009, Feb2009 etc.) and the sheets rotate (change position) with time. In the summarizing workbook I would like to use a function to refer to (for example) cell A1 on the third worksheet, regardless of the current name of that worksheet. So I might have a cell in the summary workbook that looks something like "=CoolFunction(ExternalWB.xls, 3, A1)"

View 3 Replies


ADVERTISEMENT

Referring To A Cell For The Row Position On A Formula

Jul 8, 2008

I'm trying to find the details required to refer to contents of a cell and then treat the value as the formula. IE for Sum(B5:B8), i'd like to have two cells, one with a 5 in it and one with the 8.

I know its possible if i put "b5" as the cell content using indirect - but I'll be using the same cell value to update formulas in different columns so I cant afford to include the B. I assume theres a very simple method along the lines of Sum((B&(Cell(a4)):B&(Cell(a5)))?

View 9 Replies View Related

Add Sheet To Workbook In Certain Position

May 13, 2008

I execute code to open Excel, add a workbook, and then add a 4th worksheet to the workbook. The first time through the code it works like a charm. When I execute the code the second time, I get the following error: Error Number 1004, Method 'Sheets' of object '_Global' failed.

Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook

Public Sub CreateCSVs(dtBeginDate As Date)
On Error Goto HandleError
Dim N As Integer
Dim I As Integer
Dim P As Integer
Dim strDsrc As String
Dim strDsrcDesc As String
Dim strDsrcCode As String
Dim strDsrcId As String
Dim strDate As String
Dim strTime As String
Dim strFileName As String
Dim strSheetName As String
Dim strTableName As String..............

View 2 Replies View Related

Populating Multiple Columns In On Sheet By Referring To A Column In Another Sheet

Mar 14, 2013

i'm having in excel- I'm looking to populate rows in 2nd tab based on the data entered in the 1st tab. The rows to be populated in the 2nd tab resides in the 3rd tab. So a match has to be made on the data entered in the 1st tab. When a match is found on the 3rd tab then the corresponding rows from the 3rd tab should be listed on the 2nd tab.

I have an example.xls attached for clarity.

example.xls

View 4 Replies View Related

Referring To Closed Workbook

Mar 31, 2007

I have the following formula to extract a specific cell from a closed workbook. It works fine. I want to be able to make the file name refer to a another cell so I can create a spinner to change it. For example:

='C:Documents and SettingsTom Desktoplabor[01_032407.xls]Stats'!A4

Cell A1 would be 01_032407, and I would replace [01_032407] with [A1]
but it does not work.

View 9 Replies View Related

Referring To A Worksheet In A Closed Workbook.

May 5, 2009

I'm reading data, from specific cells off a closed workbook. When the sheet that needs said cell data is activated, it automatically opens the workbook and references the sheet nessecary. The issue I've come across, is I now need to access another workbook (Easy to open) with 12 sheets 1 for each month, and only read from the worksheet of the actual Month. Kind of lost on how to possibly make this work. I basically need something like: =location/[workbook.xls]worksheet!cell - where worksheet = B12 and B12 =month(today()) and is formatted to MMMM

View 4 Replies View Related

Concatenate Formula Referring To Cell In Another Workbook

Feb 9, 2007

"Smith B" is text in C1.

My current formula in C3 is a simple reference to a cell in another workbook:

=+'Z:Time Records2007[Smith B.xls]Daily Time'!$C1352

I would the formula to refer to C1 to get the "Smith B" part.

This would allow me to copy the formula to the right and reference different text as it looks at D1, E1, F1, etc.

To say it another way. I want to know if there's a way to make a formula that would result in looking at the file Smith B.xls by inserting a refernce to C1 in it?

=+'Z:Time Records2007["C1".xls]Daily Time'!$C1352

View 5 Replies View Related

Referring To Sheet Name Through Variable In VBA?

Feb 21, 2012

I have a workbook with a list of staff in it. The format is: the manager's name is in row 1, the 8 or so team members are listed below. And again in row 20, there is a manager's name with 8 or so team members listed below. This is duplicated over many columns and multiple sheets. The sheets are all named after the ops-managers who manage all the managers on their respective sheet. The book is called "stf.xls"

I'm using the following code to look up a staff member and return who their manager and ops-manager is to the relevant cells in a different workbook:

Code:
Sub AdvisorFind()
Dim Wsht As Worksheet
Dim Slookfor As String

[Code]....

My problem is how to return the manager's name for a staff member in the middle of the book. Activesheet. is the last worksheet so no good. Wsht.name.Range(manager) is what I want to do but I don't know the correct syntax.

View 2 Replies View Related

VBA - Referring To Named Range On Different Sheet?

Jun 20, 2012

I just named a range on a sheet and would like to paste that range on a different worksheet within the same workbook. I can't figure out how to refer to the range. I've tried several different variations so far. Example below:

ActiveWorkbook.ActiveSheet.Names.Add Name:="RawSectorData", RefersToR1C1:="=R6C1:R29C11"
'Add new sheet and paste data
ActiveSheet.Name = "Raw_data_Sector_Summary"
ActiveWorkbook.Sheets.Add.Name = "RawData"
Range("A1").Formula = "=RawData!(RawSectorData)"

View 5 Replies View Related

VBA INDEX And Match Formula Referring To Different Sheet

Feb 16, 2013

I have table as below of raw data. In which data will increase dynamically both for rows and columns from starting column for eg say Column "D".

I want to get ID data on sheet2 to compare it with some other data for the ID by using formula = INDEX(Dynamic range,MATCH(ID Ref- Sheet2,Sheet1! ref -dynamic,0),column ref) and get the referred ID data on "Sheet2").

On Sheet2
ID
Data1
Data2
Data3
Data4
Data5
Data6
Data7

[code].....

View 1 Replies View Related

Formula Referring To A Sheet Based On Values In A Cell

Jan 31, 2014

How to do this:

I have many sheets called;

Input Jan
Input Feb
Input ....

Meaning 1 for each month.

I have another sheet where I want a formula that can

..............................................JUL
CapEx.................................... EBITDA...............................EBITDA %
"=('Input Jul 2014'!$BI$3)/1000"

The "Jul" which stand for July, it is possible to have a formula where I can have certain text in a formula that is based on the value in B1 (In this case, B1 being JUL in bold writing.)

Like this;

=('Input &B1 2014'!$BI$3)/1000

Or must I manually go in and replace all formulas for each month?

View 4 Replies View Related

Loop Through Each Sheet And Place Value Of Sum On Its Respective Sheet In Same Position

Nov 1, 2013

How can i get this code to run through each sheet and place the value of the sum on its respective sheet in the same positon .....

Sub maths()
lr = Cells(Rows.Count, "E").End(xlUp).Row
Range("E" & lr + 1).Select
ActiveCell.Formula = Application.WorksheetFunction.Sum(Range("E2:E" & lr))
Selection.NumberFormat = "[h]:mm:ss"
End Sub

View 1 Replies View Related

How To (not) Save Workbook Window Position?

Jun 16, 2009

I have two wide screens, and I stretch excel over both of them to gain the most useable space. Sometimes I save a file while it's on the right screen. This causes problems for my boss, because she opens the file on her computer and it opens offscreen way to the right. I could have sworn there was a setting in excel to save or not save the workbook's window position, but now I can't find it.

View 9 Replies View Related

Reference External Workbook

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

Cannot Find Link To External Workbook

Jul 31, 2014

I have a document (unfortunately I cannot attach it) in Excel 365 that each time I open it I get the usual prompt that it is calling an external link. As much as i'd love to hide the popup I need to find the link to solve to problem but I'm at a loss.

Simply breaking the links doesn't work for some reason, so I've tried updating the source to reflect the current file. No luck there.

I've searched the workbook for the name of the link in question, searching for all formula for name itself as well as variants of "[" and ".xlms".

I don't see anything in the name manager referencing that external file.

I don't recall if I copied from that particular document, I may have as it was a duplicate file. I tried looking over the cells I believe I copied from it but didn't see the reference.

I've installed Kutools and Bill Manville (MS MVP) FindLink Tool. Both of which says there is no external link.

I've looked at the compatibility checker which basically just says, yes there is an external link but give no insight on how to address.

I've tried a couple of macros, some of which crashed excel, some of which simply said that there was an external link but not how to find it. In my frustration I forgot which one that was but I'm about to try that approach again and look for that code.

external links.png

View 5 Replies View Related

Moving A Workbook With External Links

Nov 23, 2009

I want to move the workbook I have created to a different folder on the same drive. The workbook is pretty big and has loads of links to other workbooks. If I move it will all of these links fail and if so will I have to manually reset them all? I guess I am asking if there is specific method of moving workbooks which will automatically change the links to the cope with the new location?

View 3 Replies View Related

Reference To External Workbook Objects

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

INDIRECT Update With External Workbook

May 2, 2008

Is it possible for the INDIRECT function to be tweaked so it updates even when the external workbook is closed?

View 13 Replies View Related

Value Of A Cell In An External And Variable Workbook

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

Copy Module To External Workbook

Mar 26, 2009

I have been trying for some days to copy a module to an external workbook with VBA. I have about 40 workbooks that have the same format. although I developed these sheets. I am not the person who uses them. I have to on occasion alter the code for some reason, its getting tiresome.

I don't think I can use the personal workbook method for this as it is not me using the workbooks. I don't even know some of the people that use them. This courses me problems because of the number of workbooks. I want to be able to maintain the code by having to write it once and propagate it through the necessary files via the VBA.

I have code from C Pearson that copies a module to another workbook.

I have posted this here just in case. Most threads on this subject just direct you here any way....

View 9 Replies View Related

Editing External Workbook With Code

Jan 22, 2007

Once I open a new workbook, how do I make it the active workbook to have a function make changes to it? Problem I am having is even after it is open, the function will only make changes to the workbook containing the Macro (Thisworkbook)....

View 9 Replies View Related

Specify Position Of New Sheet

Feb 23, 2007

I've written code that involves adding a number of new sheets to a workbook. I want to specify that each new sheet is positioned to the right hand side of all other sheets in the book, so that the sheets are positioned in the order (when reading from left to right) that they are added.

I know about the Copy After:= thing but I only know how to specify copying after a particular sheet name. I could solve my problem by each time referencing the sheetname from the previously-created sheet, but I think there must be a way to it properly.

View 3 Replies View Related

External Workbook - Reference With Single Link?

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

Update And Then Break External Links To Another Workbook

May 21, 2014

I am new in VBA, but I have a short procedure to break all external links in the currently active workbook.Is there any option to firstly update all external links and only then break them?

Sub BreakLinks()
Dim Links As Variant
Dim i As Integer
With ActiveWorkbook
Links = .LinkSources(xlExcelLinks)
If Not IsEmpty(Links) Then
For i = 1 To UBound(Links)

[Code]....

View 5 Replies View Related

Calling Named Range From External Workbook

Jun 12, 2009

I want to copy a named range from an external workbook. Currently I am using some VBA copied from a recorded macro that first opend the 2nd workbook and then selects the named range, changes back to the original workbook and drops the copied range into the active workbook.

I would like to find a way to get around having to open the reference workbook, and instead simply point to the proper workbook name and named range.

View 3 Replies View Related

Select External Workbook And Them Merge All Sheets In One

Jul 22, 2009

I'm trying to create a workbook that opens the windows explorer and let me select a workbook, then in one worksheet merge all the active sheets present in one.

View 2 Replies View Related

Get The Modified And Open Date Of An External Workbook

Sep 16, 2009

I have a list that show file names and when the necessary works on these files were completed, but the powers that be want more. I have been asked to add two more columns, one showing when the file was last opened and the other when it was last modified.

Is it possible to do this through VBA without having to open the files that are listed? If so I will run the macro when the workbook is first opened.

View 10 Replies View Related

Link To External Workbook From Cell Reference

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

Update External Sheets Without Opening Workbook

May 2, 2009

I have 3 sheets: 1: master entry sheet that fills data in 5 different excel docs. Then there is another doc that aggregates data from the 5 and presents totals on the data. I am trying to get the end result without having to have 7 different excel files open, but when I enter into the master entry sheet, the data doesn't seem to be "pushed" up to the 5 different docs until each one is opened up. Obviously, the master aggregator is not updated since the 5 don't have the new data. When the files are all opened at the same time, the data flows perfectly, I'm just trying to find a way to avoid having to open the 5 docs in the middle of the process.

View 9 Replies View Related

Reading External File On Workbook Open

Jun 19, 2006

when i run this code under a button on a sheet it works fine. but i would like to run when the workbook opens (but i get an error message

On Error Resume Next
Application. ScreenUpdating = False
Dim wb As Workbook
Dim ws As Worksheet
'create new work order number...
Set wb = Application.Workbooks.Open("c: empex_ExternalOrderNumber.xls")
Set ws = Worksheets("NumberIncrement")
'get new WO number from numberincrement.xls
If Err.Number <> 0 Then
MsgBox Err.Description & "...help"
Else
mynewnumber = ws. Range("b1").Value
Range("g5").Value = mynewnumber
wb.Close
End If

Application.ScreenUpdating = True

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved