Reference Workbook Without Knowing Name
Jun 26, 2007
I have a master workbook, meeting1.xls which is used on a daily basis. All of the macros saved in this workbook naturally refer to Windows("Meeting1.xls").Activate.
However, I want to be able to open Meeting1.xls save it as a new name (for today's details) and then populate it.....as well as have the Macros pick up that new file name (rather than always looking for Meeting1.xls.)
I've tried saving Meeting1 as a template file and that didn't seem to work either. When I save it as a new name, the macro always searches for the original name.
View 9 Replies
ADVERTISEMENT
Feb 16, 2012
Is there a way to name a new tab without knowing its name. For instance, when I create a new tab, it could be named "Sheet2" or "Sheet3", but there is sometimes no way to know. Is there a way to edit the name of that new tab without refering to it by name?
View 1 Replies
View Related
Jun 6, 2014
I want see if it's possible to take the name of the source workbook and put it in a cell in my destination workbook and then use that as the reference in formulas. The source document title includes a date that changes yearly, or in some instances changes entirely, and I want to keep the formulas in the destination workbook intact. I don't want to have to go to every instance where I have used the source workbook and change the title. Instead I would like to copy the source workbook title, paste it into the destination in the same cell and have that propogate the needed changes into the destination workbook formulas.
View 2 Replies
View Related
Feb 19, 2010
My date of birth is 09/08/1970.I want to know that as on today,which years,months and days I have passed?
View 3 Replies
View Related
Mar 20, 2009
I currently have a macro setup that puts Auto-Sum data in the row below the bottom-most row of data. What code would I need to format this Auto-Sum row with the following parameters automatically...
1. Merge & center F & G in the Auto-Sum row with the text "Totals".
2. Change the row height of the Auto-Sum row to 44 pixels.
3. Center the vertical alignment of the Auto-Sum row.
4. Put the thickest border around the Auto-Sum row in cells A-K.
View 14 Replies
View Related
Mar 19, 2007
below you will see my macro. I have a slight problem, everything works perfect, except when I change file names. Basically I keep an electronic backup every day of the file I create. So today's file will be named DOH031907, tomorrow DOH032007, Wednesday DOH 032107, etc. etc. I use the same sheet, including the same Macro every day so it does the same thing. Basically everywhere you see "DOH031907Test.xls" I want it to put the current workbook file name there. I'm new to this kind of stuff but it seems like there is an easy solution.
Sub DOHComplete()
'
' DOHComplete Macro
'
' Keyboard Shortcut: Ctrl+Shift+T
'
ChDir "K:PICDailyMetrics"
Workbooks.Open Filename:="K:PICDailyMetricsGMDEMAND2.XLS"
Windows("DOH031907Test.xls").Activate
Sheets("EDI Demand").Select
ActiveWindow.SelectedSheets.Delete
Windows("GMDEMAND2.XLS").Activate
Sheets("EDI Demand").Select
Sheets("EDI Demand").Copy Before:=Workbooks("DOH031907Test.xls").Sheets(3)
Added Code tags - Moderator
View 9 Replies
View Related
Apr 5, 2007
Without using VBA code, is there a way to display or find the worksheet number of the active worksheet you are viewing? All my sheets have names, and I have a lot of them.
When I want to loop through a set of them with code, I want to know what numbers they are beforehand.
View 9 Replies
View Related
Jan 19, 2009
Is it possible for a macro to delete any sheet that within a workbook that does not match a specific list of sheets. For example a workbook will always have Sheet1, Sheet2, Sheet3, Sheet4... but it can have many other sheets added to it. The names of the sheets can be completely different however the sheets that I want to keep will always have the same name.
View 9 Replies
View Related
Aug 6, 2012
I have a workbook "Weekly Field Report-Master Copy" and another workbook "Weekly Field Report $$$-Master" The "Weekly Field Report $$$-Master" workbook has all the formulas that pull data from the "Weekly Field Reports-Master Copy" workbook and populates a financial report of that week's field unit production.
When I save the "Weekly Field Report-Master Copy" workbook to a new name "Weekly Field Report Job #1" and then save the "Weekly Field Report $$$-Master Copy" workbook to a new name "Weekly Field Report $$$-Job #1" is there a way to automatically change the formulas in the "Weekly Field Report $$$-Job #1" workbook to now pull data from the "Weekly Field Report Job #1" workbook instead of the "Weekly Field Report-Master Copy" workbook???
Currently I am manually changing the formulas in the new workbook "Weekly Field Report $$$-Job #1" to reference the data in the new workbook "Weekly Field Report Job #1". Otherwise the formulas pull the data from the "Weekly Field Report-Master Copy".
View 4 Replies
View Related
Sep 29, 2009
I'm sure there's a way to do this, I just haven't put my finger on HOW just yet. I have a list of stock tickers which can vary from 1 to say, 10. I need to use each of those 10 tickers in the subject line of a message. I thought I could do something with SPLIT, but that's not working for me. Here's what I have so far: u = the count of tickers. Column O contains the list of unique tickers
View 4 Replies
View Related
Mar 20, 2007
I have a nifty formula brought to me by one of the excellent members on this board. It works perfectly for what I want, but I must admit I cheated, I have a problem that was similar to the problem this formula rectified and I find myself not knowing how it works.
=IF('IIC Transfer Status'!O139="x",MIN('IIC Transfer Status'!K139+10-WEEKDAY('IIC Transfer Status'!K139-{1,3})), "" )
What Im wondering is if someone could enlighten me as to what is happening in this function, so Im not as blind to assume it is magic.
Eventually I need it to be customed tailored to work in this way: I have a column of dates, I want it to look at column A and if there is a date in it ADD 4 WEEKDAYS (business days) and return the resulting date.
i.e date in column a is march 19 plus 4 business days. Result in column B march 23.
If someone can explain how this string works that would be great, or if someone could just post a suitable function, that would work for now.
View 9 Replies
View Related
Aug 13, 2008
have a link such as www.abc.se/downloadfile?file=12345. When opening this link in a browser the DownloadFile window popups and the file can be downloaded.
I would like to be able to download the file without involving the DownloadFile pop up (since some users have auto open enabled thus the downloadfile pop-up is not always shown)
I have tried URLDownloadToCacheFile and similiar methods but they fail as they dont have the direct link to the file.
So my question now is how can I extract the direct url?
There should be a way to capture it since it will be used in the downloadfile dialog.
View 9 Replies
View Related
Aug 25, 2006
Got a bit of a stinker here. (Well, it is for me anyway. I haven't used Excel in months)!
I want to use a VLOOKUP function (I think) to retrieve data from a list of Exchange Rates on a separate sheet.
The user enters a 'Period' number, selects an 'exchange' variable (the blue text cells). The hope is to lookup the data on the 'FX RATES 06-07' sheet and return the result in the green cells.
I've tried using VLOOKUP but one of the arguements specifies that you nominate a column to return the information - that's the problem, we don't know that information when asking Excel.
View 4 Replies
View Related
Dec 2, 2008
On my spreadsheet i have a bunch of variables:
A1 = Arrival time at Checkpoint 1 - 5:53:08
A2 = Time to destination from Checkpoint 1 - 1:10:18
B1 = Arrival time at Checkpoint 2 - 6:00:56
B2 = Time to destination from Checkpoint - 1:02:30
C1 = Total distance from Start - 2.83
C2 = Arrival Time at Destination - =SUM(A1,A2)
D1 = Speed determined from the other variables
D1 is SUPPOSED to equal 25.00
It also is where I am stumped!!
Not only can I not figure out the math but also how to format the function to get the right answer.
ps: Arrival Time at Destination is only included in case it would be useful to find the answer!
View 7 Replies
View Related
Jan 12, 2007
I made a VLOOKUP formula referring to another workbook. The workbook name was 1099.XLS and there was only one worksheet in it, also called 1099.
So the reference I used was [1099.XLS]1099! but I have since realised that Excel changes that as I enter it, to '1099'!
What I would like to know is, is this a one-off action by Exel, and why? Have I used the correct reference in general -
[workbookname.XLS]worksheetname!
and did Excel's actions come about because there was only one worksheet, or because the worksheetname was the same as the workbookname, or what?
View 5 Replies
View Related
Jun 20, 2013
I believe this is the last piece of the puzzle of a project I'm working on. Here are the components I have to work with:
Component 1:
VB:
Dim file As Range
Set file = Range("rgFileToBeChecked")
'this sets "file" as the full path
[Code]...
View 9 Replies
View Related
Jul 18, 2014
I have a work book, it copies a cell reference from a work sheet in workbook2 to workbook1
It then selects next work sheet in each page and then triggers the code again.
My problem is i want the following piece of code to work.....what should i put in where it says "activeworksheet"
[Code] ......
View 7 Replies
View Related
Dec 18, 2008
I've started this thread a few weeks ago but didn't get any answers on how to solve the problem or if it was even possible to solve. I would like to know if is possible to set a reference to a NOT OPENED workbook. All the code I've tried so far didn't get me anywhere:
View 3 Replies
View Related
Nov 11, 2009
I am having trouble inserting a cell reference into a formula. I have a spreadseet that uses data from another workbook. The workbook name changes monthly, so i'd like to be able to place the workbook name in a cell and have the formulas in the spreadsheet use that cell to get the name of the workbook to get the data from. So:
if, for eg, the formula in my spreadsheet is ='[test data file.xlsx]Sheet1'!$B$4+'[test data file.xlsx]Sheet1'!$B$6
I would like to be able to enter test dta file.xlsx into cell A2 of my spreadsheet and replace a reference to A2 into the formulas. I've tried several ways, but can't seem to get it to work.
View 3 Replies
View Related
Aug 8, 2012
I have a workbook called "udf test.xlsm" with an "age" udf. How do I reference this from another workbook? If I replace the space with an underscore in the workbook name then I can call it like so:
=udf_test.xlsm!age(A1)
but with a space, it doesn't work. I tried this:
='udf test.xlsm'!age(A1)
and this
='[udf test.xlsm]'!age(A1)
but I get "Invalid Reference" errors.
View 2 Replies
View Related
Feb 6, 2014
I am using:
Code:
Dim Aname As String
Aname = ActiveWorkbook.ActiveSheet.Range("D2").Value & "Pricing"
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=Aname & ".xls"
to create a new workbook. I need to copy 2 columns from the original workbook/worksheet to the one being created though. I can get the the original easy enough, but then getting back to the newly created book is proving difficult.
(the 2 columns being copied are filtered to what is needed and I have used the below to copy it, yes I know that is 3 rows but I couldnt get it to copy just E and G at the same time to the lastrow without including F)
Code:
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
With .Range("E2:G" & LastRow)
.Select.copy
End With
View 7 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
Aug 7, 2009
I am trying to write a formula that will pick the data out of a closed workbook.
Indirect works but it doesnt help because the workbook needs to be open and there are literaly hundreds of workbooks to sort thru.
Is there a way other than find and replace to have a formula pull data from a specific cell in another workbook, based on say cell A1 or A110?
View 9 Replies
View Related
May 15, 2007
I have a formula that calculates data from the workbook that the formula is in. I need it to do the same calculations only pull the data from another workbook. Here is a sample formula:
= SUM(X1504 + SUMPRODUCT((H1:H394=73)*(U1:U394="NVLIV"),S1:S394))
Would I do something to the nature of:
=SUM(C:/sample.xls[Sheet1$x1504] + SUMPROD...etc...?
Basically how do you reference another workbook that is closed?
View 4 Replies
View Related
Feb 18, 2008
Ive just finished writing a macro that copies data from different parts of one workbook into a new workbook. However after doing all that my boss now informs me that the first workbook will be renamed regularly.
Is there a way adding a reference to a workbook that is not dependant on the name? Possibly declare it as a variable at the beginning or something? The indexing is not possible either as they might have multiple Spreadsheets open at any one time.
View 4 Replies
View Related
Jan 23, 2014
I have a master workbook that I reference data from hundreds of excels on.
I am trying to reference the cell "BU7" that has the workbook name (NT-13-001) in it, to reference sheet name "Purchase Order" at cell "H13".
Next line I would like to reference the cell "BU8" that has the workbook name (NT-13-002) in it, to reference sheet name "Purchase Order" at cell "H13".
The computer path is K:FRG TOOL REQ2013NT FormsNT-13-001
This is the formula I have tried... I have also attempted the INDIRECT function & Hyperlink GO TO.
=IFERROR('K:FRG TOOL REQ2013NT Forms["&DU7&".xlsx]Purchase Order'!$H$13,"")
View 1 Replies
View Related
Mar 19, 2014
So finally got my sumrpod working using this formula
=SUMPRODUCT(1*('Q:Documents13-14 FCGP CONTRACTING13-14 TrackingSouthPac - Team Use Only[South Pac Load Tracker - MAR14.xlsm]SPECIALS TEAM NZ'!$C8:$C10000=A5))
Is there a way i can link 'Q:Documents13-14 FCGP CONTRACTING13-14 TrackingSouthPac - Team Use Only[South Pac Load Tracker - MAR14.xlsm] to a cell so that when the next months tracker is created and the filename changes i simply change the filename in the cell which im using to reference the filepath/filename.
e.g A1 = South Pac Load Tracker - MAR14.xlsm
Formula would read =SUMPRODUCT(1*('Q:Documents13-14 FCGP CONTRACTING13-14 TrackingSouthPac - Team Use Only[' & a1 & ;]SPECIALS TEAM NZ'!$C8:$C10000=A5))
View 1 Replies
View Related
Dec 27, 2006
I am just wondering if there is a way i can search an excel workbook for a particular reference number. eg
name reference money
dave 60056835 £20.00
clare 50065755 £30.00
If i want to search for Ref 60058635 i just want to type it in and excel will the search the workbook and direct me to the correct page and column.
View 14 Replies
View Related
Jul 3, 2013
I do a payroll workbook for my small company. Each sheet inside the workbook is a month. Each sheet totals the monthly labor categories. I would like to keep a "year to date" total on each employee and therefore would have to reference each sheet.
Setting up a formula (or tell me where to look) on how to total worksheets inside a workbook?
Example: the workbook contains a total of 12 sheets, representing the 12 months of the year. Add "cell reference" from sheet 1 to sheet 2 to sheet 3 to reach a total, then when sheet 4 is completed it contains the cumulative totals of all 4 sheets, etc., etc. Where I can look at this "year to date total" and compare to last years "year to date total".
View 2 Replies
View Related
Jan 28, 2014
I need to reference a different workbook in a while loop. Each iteration, PopFive increases by 3, as I want to pull the numbers of every third row. How does the syntax of the line go after the " ! "?
[Code] ......
View 1 Replies
View Related