Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


To Change All References In The Workbook Easy

I have many files that has a filepath references in the cell values, for example:


Is there a way to change all the references to direct to another place?

Filenames don't change, only the '\serverfolder1subfolder2 path

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Change Static References With Lookup References
I am using the dsum formula to sum some values...the formula in B2 is:

=DSUM(BaseSistemasFebrero,"vlfinf",OFFSET('Planes Entidades'!B$1,0,0,COUNTA('Planes Entidades'!B$1:B$49),1))

The Planes Entidades sheet the data is layed out like this: ....

View Replies!   View Related
Change MSQuery References
I have a spreadsheet that queries another spreadsheet, using MSQuery. The query is of a named range on another workbook. What I am trying to do is change the workbook reference, to another similar workbook, with the same range name. MSQuery is not easily letting me do this. I figured there was a way to simply change the file that the created table (in MSQuery) is using. There doesn't seem to be a way to do this.

The named range is "data." This is what the SQL view looks like: ...

View Replies!   View Related
A Way To Get The Cell References In A Formula Change
Is there a way of getting the cell references in a formula change following a change in the content of a cell in the worksheet?

View Replies!   View Related
Getting Cell References To Change Orientation
I would like to reference cells in another tab in my worksheet, but change the orientation.

For example, in Tab 2, I want to make rows A1:A26 equal to columns A1:Z1. Do I have to click back and forth between worksheets 26 times, or is there a way around this?

View Replies!   View Related
VBA Code To Change Tools-references
I am setting up VBA code to create different excel workbooks. One of the differences is in the VBA Tools References that must be enabled to make the whole thing function.

How do I write VBA code to turn on and off specific tool references ie. if i had a reference called OrbitCOM Library how can I turn it on and off using VBA code.

View Replies!   View Related
Make A Global Change To Many References
I have a large excel matrix that contains many references to a Word document. The path to that document includes /ref Doc1/ in every reference. I want to change that to /ref Doc1 rev1/. Is there a 'replace' tool to do that?

View Replies!   View Related
References Change When Importing Data
This issue is similar to absolute/relative references, but it's related to the data being referenced, not the cells doing the referencing. If I have a call the references cell A3 then I insert a row above row 3 (making the original A3 cell now A4), my reference automatically changes to A4. How can I get it to stay at A3 no matter what happens?

This may sound like an odd request, but I reference a bunch of cells on a worksheet. This sheet retrieves data from a database which changes regularly. The changes that it receives are not just updated in the cells, but rather the rows are deleted and reinserted changing all my references to this sheet. For example, say I import data and it fills cells A1 to A20 and I make a reference to A15. If I change the data that is imported and the data now only fills cells A1 to A10, the reference to A15 is now set to #REF since it actually clears all cells from A1 to A20 and then reinserts new data.

View Replies!   View Related
Change From Absolute To Relative References With Excel Macro.
How to change from absolute references to relative references.

Example :
ws.Range("G" & NextRow).Formula = "=" & Range("H" & NextRow).Address & "+" & ws.Range("I" & NextRow).Address
This code return the absolute references---> =$H$365+$I$365
, and i want change to relative references, like this ---> =H365+I365

View Replies!   View Related
Change Multiple Formula Range References Between Absolute/Relative
Is there a way to absolute reference multiple cells at one time?

View Replies!   View Related
A Formula In This Workbook Contains One Or More Invalid References
I have a rather complicated workbook with many VBA formulas. When I close it down a window displays "A formula in this workbook contains one or more invalid references". verify that your workbook contains a valid path, workbook, range name, and cell reference.

This only happens when I close the workbook. I seem to have all functionality. How can I find the invalid reference.

View Replies!   View Related
Vlookup References A Table In Another Workbook
In trying to construct a Vlookup formula that references a table in another workbook, I find that when I double click on the tab in the source workbook to insert the name, and then complete the formula with the column reference and a False statement, I keep getting an Invalid statement in the fx wizard when I try to solve this problem. By entering the name range by typing, I get a #NAME? error when I go to the wizard to see what Ive done wrong.

This issue was addressed in the link that I searched for in the old help files and submit in this question. It seems that the issue was never resolved in that posting and I cant figure out how to resolve this matter.

View Replies!   View Related
Formula That References A Cell Where Workbook Is A Variable
Say cell C5 contains the name of a project (workbook). eg

C5 = "[Project1]"

In my current workbook, I want to find the value in cell B8 of Sheet1 of the project shown in C5. If I wrote this directly, it would be "='[Project]Sheet1'!B8"
But the name of the project is a variable shown in cell C5 (as explained above). So I need a formula that will find the value in cell B8 of sheet1 of the project shown in C5.

View Replies!   View Related
2007 Macro Relative References Works On Only One Workbook
In Excel 2007 I am creating a macro with the "relative references" setting turned on. I want to repeat some tasks like: go to column A, sort, hide columns B thru F, hide columns H & I, return to column A.

Every time I try to create this macro by capturing key strokes, it inserts the workbook / worksheet name in the macro! Kinda defeats the ability to use it in any other workbook.

I am recording the macro in the PERSONAL.XLSX workbook. I have other macros that successfully perform in any workbook they are used in . . . but today I can't create one that doesn't incorporate the name of the original sheet it was recorded in.

View Replies!   View Related
Copied Worksheet With Macros Still References Original Workbook
I have a workbook within which i have a worksheet that contains a lots of macro code (coded by me). As the workbook gets used by various people, i need to copy the worksheet and the macros across to the updated workbook, which doesnt contain the macro worksheet at all.

I have tried to copy it across by clicking on its tab and using the move or copy facility. This copies the sheet across as required. But for some reason, the macros all reference the old workbook. A small bit here for example for some reason opens up the old workbook and then performs the code in the old worksheet:

Sub SelectAll()
For i = 12 To 20
Set curcell = Worksheets("Form Generator").Cells(i, 3)
If curcell = False Then
Cells(i, 3).Value = True
End If
Next i
End Sub

As curcell is equal to worksheets...() i would have expected it to use the local worksheet, ie the one that the macro is attached to. So why is excel proactively hunting out the old workbook and sheet? is the method i used to copy across the sheet with the macros incorrect? If so, how should i go about it?

View Replies!   View Related
Easy Way To Sum Every 6th Column
Is there an easy way to add every sixth column?


I am all the time doing something like this. Is there a formula or something of that nature that would sum every 6th cell down starting a a given point?

View Replies!   View Related
Should Be Easy, Having Trouble
I'm having real trouble selecting a series of rows based on variables for the purpose of cutting them and pasting them elsewhere in the spreadsheet. For example, if this is my spreadsheet

2 I Hate
3 Bill
4 O'Reilly

I want my code to select the range of 2:4, cut them, and paste them elsewhere but I want 2:4 to be variables. For example

Fun = 2
Stuff = 4


But doing "Rows(Fun:Stuff).Select" does not work at all. If you do Rows(Fun).Select, this works to select Row 2, but I can not use the variables to select a range.

View Replies!   View Related
Changing Hard Coded Column References To Variable References
I have a number of statements within the Sheet Event Code (Excel 2007). Three times lately I have added a column and had to go back into the code and find all of the references that needed changing to reflect the new column.

I have been working on this for a couple of days and even tried EE, but to no success.

I have read that Defined Names / Constants should be used as often as possible, but even trying that, the VBA code errors out or "hangs up". Even within Bill Jalen's book (VBA and Macros 2007), there is nothing that addresses this, especially using Intersect.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

On Error GoTo mEnd
Set rng = Sheets("Log").[F14:F10000]
If Not Intersect(rng, Target) Is Nothing Then
If Target = "" Then
With Sheets("Log")

View Replies!   View Related
Easy Row Delete With Code
This is the code I have so far:

Sheets("Oven Codes").Select
Selection.Delete Shift:=xlUp
Sheets("Item Edit").Select
What I would like to do is have VB look to E1 to determine which row to delete. E1 could say 5 or 25.

View Replies!   View Related
Structured References And With Cell References I Get A Column Of Zeros
It is suppose to be that if the employee is "FT" and has worked >=4 years the return is 15. But if the employee is FT and has worked 2 years but less than 4 years then it is suppose to return 10 (these are days off) Or if the employee is FT and has worked 1 year, but less than 2 then it should return 5 days off. And all the others in the column get no days off.

I have tried to do it with structured references and with cell references I get a column of zeros!

View Replies!   View Related
VBA Password Crack/Hack - How Easy Is It?
Ok, so I'm a little cheezed that I've been volun-told to give up an economic model that took me over 8 months to develop to a few investment bankers that will likely sell it to the highest bidder. Of course, with no credit to me.

I've already taken a few of the necessary steps to lock it down.


- Lock/hidden cells along with sheet protection (with password) - to prevent viewers from seeing the formulas I used.

- protect workbook (with password) - to prevent copy/paste of the sheets

- VBA - Tools - VBA Project Properties - Protection - Set password - to prevent viewing of the macros

- Hiding sheets using "Very Hidden" in VBA - to prevent viewing of sheets in general.

I guess my real question is, when this is all said and done, how easy is it for someone to break through all the passwords that I've set up in the workbook? If it's ridiculously easy, how do I prevent it (if at all)? What else can I do?

View Replies!   View Related
Easy Time Entry Mask
I have entered VBA code and tested it with success. If I then save & close the excel file and then re-open it, the mask time entry is not saved (time does not appear correctly after input) and per instructions I have designated (and am using) the cell input range.

View Replies!   View Related
Easy Navigation Of Multiple Sheets
I have a workbook with over 100 worksheets (all worksheet tabs are named). Since the tabs are not sorted in a numerical order (they are grouped by departments hence the numerical tab order does not apply), can I search for a particular worksheet tab using a search function? The CTRL F function doesnt allow searching for worksheet tabs. At the moment, I have to go through the tab names in order to find one particular tab.

View Replies!   View Related
Easy Weighted Average For Thousands Of Items
I am trying to calculate weighted average cost for a list of thousands of items.

I will try to explain this as best I can.

Column A is item. Column B is Mode. Column C is Volume. Column D is Cost

There are only 2 Transmode Per Item. So each item is pretty much listed twice and I need to calculate the weighted average cost per item.

I know how to use the SUMPRODUCT function to calculate weighted average and could slowly go through the spreadsheet item by item calculating this, but is there a way to do this with some sort of formula? Similar to a Subtotal that would recognize each change item and calculate the Weighted Average at that change.

View Replies!   View Related
Easy Navigation To Specific Ranges Or Areas
I have a spreadsheet that lists values for different grid lines. On top of each set of data, I have labels each line "Line A", etc. I want to put in possibly a pull down menu at the top of the sheet that the user could use to jump to whichever line they were interested in viewing. For example, if the user needs data from Line L, they could select Line L from the drop down menu and the spreadsheet would jump down to that area.

View Replies!   View Related
Show Worksheets Tabs On Current Worksheet For Easy Access
You could use:

If ActiveWorkbook.Sheets.Count < 17 Then
Application.CommandBars("Workbook tabs").ShowPopup
Application.CommandBars("Workbook tabs").Controls("more Sheets...").Execute
End If

The code doesn't do anything on my excel workbook which currently has like 20 workbooks, and it grows daily by like 4 or 5 worksheets.

View Replies!   View Related
User Form-Easy Selection Of Data To Be Filled In The Form
find the attached workbook

I have a Database and user form, in the user form i have a field named Vehicle No this is a combo box from which a user needs to select the Vehicle numbers, and all these are working fine now, I need your help in the following:

When user selects the second field named "Select Vendor name" i need a pop up window which shows all the Vehicles belongs to the vendor which they have selected, and with the popup window user selects the vehicle number then the Vehicle number combo box should be filled.

Currently users have to select by scrolling through Combo box which takes long time and difficult to find by scrolling.

View Replies!   View Related
Change Workbook To Read Only
I have a shared Excel Workbook, and I am trying to prevent a non-permitted user from making any changes to it. I have managed to hide all of the worksheets bar one - The Warning Page - if the user is not one of my chosen users, but I am having a little trouble setting the worksheet to open as "read-only" if the user is not one that I have listed.

My macro code looks a bit like this:

If Application.UserName = "Vikki" Then
Sheets("Warning!").Visible = False
Sheets("Total").Visible = True
Sheets("Warning!").Visible = True
Sheets("Total").Visible = False
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End If

But when I am using this, a non-user will get a msg box asking if they want to save the workbook before changing to read only. Can I prevent this msg box from appearing?

View Replies!   View Related
To Change Hyperlinks In An Workbook
how to do this massively, without going into each cell? Maybe some VBA code. I just need to change the beginning of the path to point to another directory.

View Replies!   View Related
Change The Workbook Value In The Same Folder
i have as many as 100 workbooks in the same folder(such as "e:/data"),i should change the same address value in each workbook. first i write the code use "application.filesearch",but it can't run because it has removed FileSearch in excel 2007. i get the code below from Ron de Bruin

Sub test()
Dim wbOpen As Workbook
Dim ws As Worksheet
Dim I As Long
Dim myfiles() As String
MyPath = "e:data"
If Right(MyPath, 1) <> "" Then
MyPath = MyPath & ""
End If
'If there are no Excel files in the folder exit the sub
FilesInPath = Dir(MyPath & "*.xl*")
If FilesInPath = "" Then
MsgBox "No files found"
Exit Sub
End If...................

View Replies!   View Related
Workbook Calculating On Any Change
I'm having a problem with calculating my formulas. I have it set to auto. I've always had it there. And it used to work fine. But now when I calculate, anything I do to another cell not associated with the ones I'm calculating it makes it recalculate. How do I keep it on auto without making it recalc everytime I do something? Mainly I have an override command on another sheet that enables you to replace the info in a cell (on a diff sheet) if you dont like the product of the calculation. When I make the override for that one cell it recalcs all the info. I just want it to recieve the override for the one cell with recalcing my others.

View Replies!   View Related
Change Sheets In New Workbook Does Not Work
I am using Excel 2003.

I tried to change the number of new sheets in a new workbook, e.g. from 3 to 1.
But the option has no effect on new workbooks. They still show 3 sheets.

View Replies!   View Related
Change Open Workbook Password Box
I need to know weather it is possible to change the "Password protected workbook" box upon file open with a custom user form. I know you can because you can change and disable the "Save As" box etc. I dont mind using the code with a certificate to open the workbook but id prefer not to...

View Replies!   View Related
Change Sheet Macro Name In A New Copied Workbook.
I have a workbook, 'MyWb.xls' and a sheet with buttons to which I attach some sheet macros. When I assign a macro to a button I pick the appropriate reference, e.g. Sheet2.MyMacro, and this gets recorded by default as MyWb.xls!Sheet2.MyMacro

When I create a new single sheet workbook with the instruction ActiveSheet.Copy, I end up with a new workbook, say 'Book2' along with the buttons as expected. However the macros attached to the buttons still refer to the MyWB.xls file and not the new 'Book2.xls'. As part of the process of creating the new book I've tried redefining the macro with the instruction

View Replies!   View Related
Does OFFSET Cause A Worksheet Change On Workbook Open
I have a formula that uses the OFFSET function so that subsequent row adds will automatically adjust the formulas. For example, cell A1 contains the value 1 and cell A2 contains the formula:

=offset(A2,-1,0) + 1

When I insert a row above row 2, the formula above adjusts to reference cell A3, which is what I want.

What I am running into is that when the workbook is opened, something in the workbook changes, causing the "Do you want to save the changes..." popup to appear even though all I do is immediately close the workbook.

I have traced the problem to my use of the OFFSET function, as when I change the formula to


and repeat the scenario, the workbook closes without the "save" popup.

Does the OFFSET function cause something to change (no cell values appear to have changed) and is there a way to get around this?

View Replies!   View Related
Automatically AdvancedFilter To Another Workbook On Criteria Change
I am trying to achieve the following and am not certain how to achieve this in Excel 2003.

1. make the Criteria Range Dynamic in Advance Excel, so that the Filter automatically updates on every Criteria change.

2. Raw Data range is kept in Closed workbook

3. Filtered Result displayed in another Workbook.

View Replies!   View Related
Calculate A Specific Sheet When Something Change In The Workbook
I have build an add-in To Calculate Specific Sheet when something change in the workbook. For this I am unselecting the "automatic calculation" option and check "Manual". Now with every change in a cell i would to call AUTO_CALCULATION_PI that is calculating only the sheet that the user have been selected.

The problem when i change a cell Workbook_SheetChange is not stiggered and nothign happen. I dont understand why? The add-in is doing the following. Create a Menu "PI Options", this open a user form where you can select the worksheet to calculate, the choices is store in hidden worksheet called "AUTO-CALCULATION-PI". When a cell is change the Macro AUTO_CALCULATION is called, and calculated the sheets that the user have selected.

View Replies!   View Related
Sub To Detect Any Change In Cell Selection Within Any Open Workbook?
I know of

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

but I would like to expand this idea to detect any change in cell selection across all open workbooks.

View Replies!   View Related
Workbook Sheet Change Event Prompts Save
I have many worksheets in a workbook that need to be saved if a user changesanything on them.
These sheet names all end in "....SD" and the code needs to only run on those sheets. I have learned alot from the forum but not enough, just yet . . This is what I have so far:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sht As Object
For Each sht In ThisWorkbook.Sheets
If LCase(Right(ws.Name, 2)) = "sd" Then
MsgBox(Prompt:="You must save changes. Save now?", Buttons:=vbYesNo) = vbYes Then ThisWorkbook.Save
End Sub

It doesn't like the 2 "Then's". (Don't laugh - I'm trying.)

View Replies!   View Related
Renaming Sheets (newly Opened Workbook And Change It's Name)
I'm experimenting a bit with this code. The idea is the following:

I've got one spreadsheet (ThisWorkbook) were I define 5 names for 5 worksheets in all files of a specific folder (c: emp). I get stuck at this line: "wb.Sheet2.Name = myval2", since I'm for some reason not able to activate the newly opened workbook and change it's name....

Sub wd_testing()

Dim I As Long
Dim wb As Workbook
Dim firstrow As Long
Dim sht As Worksheet
Dim cell As Object
Dim count As Integer
Dim myval2 As Variant
Dim myval3 As Variant
Dim myval4 As Variant
Dim myval5 As Variant
Dim myval6 As Variant
Application.ScreenUpdating = False

It's important to mention that there is no name conflict and the names work when entered manually.

View Replies!   View Related
Assigned Macro Name Does Not Change When Workbook Is Copied And Renamed
I've created a custom toolbar and populated it with a custom button. I have created a macro and it resides in ThisWorkbook. The macro is assigned to the custom button and the toolbar attached to the workbook. So far, so good. If I copy the workbook and rename it, when I click the button to run the macro it launches the original workbook and runs the macro. The macro effects changes on the renamed workbook copy. The macro name found in the assign macro dialogue starts with the original workbook name. The same effect if the macro resides in a module or sheet. Any known way to have the macro name change along with the renaming of the workbook such taht it refers to the currently opened workbook macros? Regards.

View Replies!   View Related
Can I Change A Setting Somewhere To Make Close Its Default Blank Workbook When I Open An Existing One
I have Excel 2002. If I start the program it opens with a blank workbook, called "Book 1".

If I then open an existing workbook, I have two Excel buttons in the Windows taskbar: the one I just opened, and the blank one titled Book 1.

At work I have Excel 2003. The blank "Book 1" is also there when I start the program, but if I then open an existing workbook, the Book 1 goes away. I like this way better.

My question is: Is this just the way versions 2002 vs. 2003 work, or can I change a setting somewhere to make Excel 2002 close its default blank workbook when I open an existing one?

View Replies!   View Related
How To Nest References
What I'm wanting to do is essentially use a reference to update yet another reference.

In more detail, I want to retrieve a value on a worksheet and use that value to alter yet another reference to another worksheet.

For example, I want to retrieve a value (let say its 16 from either a local cell or a cell on another worksheet) and then retrieve yet another value from another worksheet based upon that value (lets say the worksheet I would want is then "Subject 16").

I've attempted various nesting formats of the typical reference formula but obviously have had no luck. Would I need to use VBA or is there a simple solution that I am missing? If I do have to use VBA how should I go about doing this?

View Replies!   View Related
Circular References

and i wanted to divide these all by 4.

I can do this by clicking on a cell OTHER than one of those four above, and do:

=A1/4 (if 15.2 was A1) and copy that formula down.

But then I have the originals AND the new ones in separate columns.

I want to just be able to divide those original numbers by 4 without resorting to using other cells, but if I do =A1/4 on A1 itself it says that i have made a "circular reference"

View Replies!   View Related
Can You Use INDIRECT In 3-D References
For example
where C10 would contain
always returns #REF!.

However, ="Sheet3!"&"A"&ROW() as the Cell C10 entry will work fine.

View Replies!   View Related
Check And Set References With VBA
for example, is it possible to check if a Reference to Set a reference to Microsoft Internet Controls (shdocvw.dll) has been enabled in user Reference settings. And if not set, then set it via VBA

View Replies!   View Related
SAP Connection - Which References
I'm trying to connect to SAP R/3, and I think I'm not sure which references (Tools --> References) I'm supposed have checked.

All I want to do for now is the following:

Dim sapConn As Object
Set sapConn = CreateObject("SAP. Functions")

Unfortunately, I am getting a "Run-time error '-2147024770 (8007007e)': Automation error. The specified module could not be found."

I have read somewhere random on the internet that I should add "SAP:Remote Function Call: COM Support 1.0 Type Library" which links to the SAPGui Provided library librfc32.dll. However, this alone doesn't seem to work...

View Replies!   View Related
References By Using Paths To Other Workbooks
is it possible to use references and concatenate them together that they are still references?

i have in:

A1: 'C:Infonic[file2.xls]sheet2'

A1: test

what i need is in sheet2 of file1

the value of file2.xls!sheetY!A1 = test
the problem is that i need to use the path to file2!sheet2 of the cell A1 in sheetX

is it possible to use sheetXA1 together with sheetYA1 as reference in sheet 2 so that i get back test as value.

View Replies!   View Related
SUMIF - 2 Conditions - With References
I have the array formula:


It works fine except I want it to reference the cell that the number 26 is in rather than having to have it in quotes, i tried this, but don't get the same answers as this way. The reason being is more conditions may be added in the future which would mean for example the 26 could change to a 34 etc so i rather not have to have someone manually change that number in the formula and just have it refence a cell.

View Replies!   View Related
Replacing References In Two Columns
I have 2 colums like this. And I want whenever there is a reference like this . "some word" in column 2, to have the macro look up some word entry in column 1, find the text in the same row in column 2 and replace the . "some word" reference with the text found in column 2. (See attached, sheet 1 as it is, sheet 2 as I want it to be).

Sheet 1

another word. "some word"
bword. "aword"
some word

Sheet 2

another word
some word

View Replies!   View Related
Using Cell(s) References In Path
I'm trying to copy a file from one directory to another directory. However, the source directory, I'd like to have it so it's created from values within specific cells on a Sheet named "PULL".

When trying the following, I get an error permission denied.

View Replies!   View Related
Copyright 2005-08, All rights reserved