Create Links To Multiple Csv File In The Same Workbook

Jul 19, 2006

My first post at last.

I've recorded a Get External Data macro and wish to modify source and destination components. I would like to replace the absolute link to the file name with a variable and the Destination range to the active cell at the time I run the macro.

This is the is the macro code line that handles the source and destination components I want to modify.

Range("AQ2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:filename.csv", Destination:=Range("AQ2"))

View 3 Replies


ADVERTISEMENT

Create & Save Workbook To Same Path As Macro File

Aug 21, 2008

I have code to create a new workbook, and when I try to rename it I get "Compile error: Can't assign to read-only property."

Dim objXlApp As Object
Dim wkb As Workbook
Dim wks As Worksheet
Set objXlApp = CreateObject("Excel.Application")
' Create a workbook
Set wkb = objXlApp.Workbooks.Add
' Delete all worksheets bar the first one.
For Each wks In wkb.Worksheets
If Not wks.Index = 1 Then
wks.Delete

End If
Next wks
'Create some worksheets and names
With wkb
.Worksheets(1).Name = "myWorksheet1"
.Worksheets.Add.Name = "myWorksheet2"
.Worksheets.Add.Name = "myWorksheet3"
.Worksheets.Add.Name = "myWorksheet4"
End With...................................

View 5 Replies View Related

External File(s) Referenced And File Links Change Based On Row Cell

Oct 22, 2009

I have attached the file I am working on. I am attempting to create a link to an external file based on the value of cells in column A. Then I would like to simply copy the formula down, lets say in Column B, the rows and as I do the external file reference will change depending on the value within the cell in Column A. I hope that I am making sense.

I am using Windows Vista with Excel 2007. The files will all be within the same file folder, however, there are hundereds of files so I won't be able to open them all for the indirect to work.

View 9 Replies View Related

Create Master Workbook From Multiple Workbooks

Jul 3, 2013

I need to consolidate a lot of information from multiple workbooks all the workbooks are located in a folder, i am not bothered about running each one separately or a group at a time, each work book has ten sheets with each sheet in the workbook being different, it needs to add to the next blank row on each sheet.

View 1 Replies View Related

How To Create Array Set For Checking Multiple Workbook

Jun 5, 2014

Create array set for checking multiple workbook?

[Code] .....

View 11 Replies View Related

Create Multiple Workbooks From A Single Workbook

Jun 3, 2009

On a weekly basis, I receive a single worksheet in a workbook that contains ~30,000 rows of product sales.

Row one contains column headings that is unique to all other rows. Column A contains the store number that sold the product. There are ~50 unique store numbers.

I am trying to create a macro that will break the report up into seperate workbooks.

For example, assume in column A there are 30 rows of data for 3 different store numbers (say store 112, 386, & 798, each with 10 rows of data). I want to create 3 new workbooks and include the same column heading for each. For example, name new workbooks as follows: "Store 112", "Store 386", "Store 798".

View 7 Replies View Related

Create Master File With Macro Built In That Will Allow Multiple Users To Use It At Once

Feb 7, 2014

I am trying to create a master file, with a macro built in, that will allow multiple users to use it at once. The macro is to open a dilouge(sp sorry) box showing the contents of a specific folder, allow the user to selct one of the sheets, then copy and paste the set details from the hidden tab on this sheet (All sheets will be the same barring title), append the details to the master list in the first empty row.

I've got this far thus
Sub Macro1()
'
' Macro1 Macro
'
'
' Modify this folder path to point to the files you want to use.
FolderPath = "My Folder name here"

' Set the current directory to the the folder path.
ChDrive FolderPath

[Code] .....

So I can copy the row, but I can't get the first part to open .

View 3 Replies View Related

Create Click-able Links To Worksheets

Sep 13, 2007

I am interested in finding out how to link worksheets. For example: the bottom tabs for worksheet1 says contacts. tab for worksheet2 says projects. I want to link from worksheet1 to worksheet2 by clicking on a link that will take the person to the project. On worksheet 2 I have more than one project. THerefore, on worksheet1 after all the content I'd like to have a link that says Project 1 with a link that sends the person to the next worksheet. Same with Project 2. I know this is possible. I have already added the formula. Now I need information on how to insert a link that can be clicked on that will go to the next page.

View 4 Replies View Related

Create IF / LOOKUP Formula To Look At Multiple Sheets Within Workbook?

May 5, 2014

New to using Excel formula's and am trying to create an IF/LOOKUP formula to look at multiple sheets within a workbook and display the information within the 'compare' sheet.The yellow cells are where data will be entered.

What I am trying to achieve:

Type the store numbers on the compare sheet (B2 and D2). For the sheet attached I have put 190 (in B2) and 2012 (in D2)

B2 store shows the predicted and actual values of 190 in columns B & C

D2 store shows the predicted and actual values of 2012 in columns E & F
(No need to worry about variance and difference columns)

So, if I change the store numbers in B2 and D2 to any of the sheet numbers, I want it to display the correct info for that particular store within the compare sheet.

I have attempted a formula, which you can see... I have basically looked at some previous sheets that had IF and LOOKUP on it and tried to replicate that for my sheet, but with no luck.

View 3 Replies View Related

Create Multiple Workbooks With Data From Single Workbook

Mar 18, 2014

I have a TEMPLATE workbook that has 106 cells (all in the same worksheet) that need to have data input in them.

I have a separate DATA workbook with 3,000 rows of data, each row has 106 columns that correspond to the cells in the TEMPLATE workbook.

I need to create 3,000 new workbooks that are populated with the data from the DATA workbook.

View 3 Replies View Related

Create A List Of Files With Clickable Links

Mar 17, 2006

I've found countless, very useful macros that do 1/3 of what i need. My needs:

1) A macro to look in a set network folder, and generate a list of Excel files, and display them (1 per row, just the file name if possible)

2) Each file name is a hyperlink to open that sheet

3) A macro to look at the file listed above, then list in the column B a value from a set cell. So it would ideally output:

1| RH0018.xls A1CellValue
2| RH0019.xls A1CellValue
3| RH0020.xls A1CellValue

View 2 Replies View Related

Create Multiple Workbooks From One Single Workbook Based On Customer Code?

Jul 6, 2008

I have an excel file which contains following data in it.

Col-A Col-B Col-C ......
Cust Cd Name Sales
=======================
101 AAA 1000
101 AAA 500
101 AAA 3000
102 BBB 800
102 BBB 200
103 CCC 200
103 CCC 200
103 CCC 200

I need to create following three workbooks with name based on Cust Cd from above excel file.

Workbook - 1 : 101.xls which contains records only pertaining to Cust Cd 101.

Workbook - 2 : 102.xls which contains records only pertaining to Cust Cd 102.

Workbook - 3 : 103.xls which contains records only pertaining to Cust Cd 103.

View 4 Replies View Related

VBA Macro To Create Multiple Workbooks From One Master Workbook By Cost Centre

Jun 27, 2013

VBA Macro to work through a worksheet that consist of static data (tab 4) cost centres and to populate a new work book per cost centre consisting of three tabs for every cost centre found in the static data.

The master Workbook has the following tabs:

Tab 1 is called travel and consist of column a which is the cost centre number (plus 14 other columns)

Tab 2 is called Mobile and consist of column a which is the cost centre number (plus 14 other columns)

Tab 3 is called Expenses. and consist of column a which is the cost centre number (plus 14 other columns)

Tab 4 Static Date column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns).

If no information found on a specific cost centre, the tab will include the headers and return the words "No transactions for this period"

Whilst splitting data into Tabs the workbooks should check against the Static Data table and include cost center description in Column B of each tab in the new workbook.

If master workbook consist of the following....

Tab 1 is called travel and consist of column 1 which is the cost centre number (plus 14 other columns), cost centres, 555,557,

Tab 2 is called Mobile column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns) cost centres, 555, 78689,

Tab 3 is called Expenses. column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns), cost centres, 555,

tab 4 Static Date - column 1 cost centre number and consist of column 1 which is the cost centre number (plus 14 other columns). cost centres, 555, 557,78689

It should output 3 workbooks by cost centre number.

One for 555, which consists of 3 tabs, travel, mobile and expenses.

A second for 557 which has 3 tabs travel, mobile and expenses, but only with data in the travel tab.

A third for 78689 which has 3 tabs travel, mobile and expenses, but only with data for mobile data.

The workbooks will be replicates of the contents within the tabs where column a wil be the cost centre plus 14 additional columns.

View 5 Replies View Related

Create Formula That Links To Another Sheet Based On User Input

Jan 8, 2009

I'm trying to create a formula similar to this:

=Calculations!(Indirect("N"&A2)-Indirect("AB"&A2)+Indirect("AA"&A2)

The idea is that the user will enter a value in cell A2. That number will determine the appropriate rows in the formula above.

View 6 Replies View Related

Links To A File In My Documents

Aug 21, 2009

I have a template that I wish to distribute to others. It will link to a second file (also distributed by me) that will be in each users' "My documents" folder (or "Documents" in Vista). I currently have the template set to look at "C:" as that is common for everyone. Turns out that creates other problems. However, now each user's file location will be unique due to the path of their documents folder

Question, is there a robust way to automate the finding of the linked file in the template without having each user "relocate" it? Reason is the template will be updated frequently and I want to ease their pain by not making them go through this every time.

View 9 Replies View Related

Excel 2007 :: Stop Links Changing When Use SaveAs To Create Backup?

Sep 25, 2013

I have two spreadsheets that are linked in Excel 2007. They both hold very different information about the same projects, so each row shares some information. However, they are both very large and I do not want to combine them in case the whole spreadsheet becomes unusable. I'm not allowed to use a database

When I save Spreadsheet 1 in a different location, so that I have a backup of the precious data, the link in Spreadsheet 2 changes to show that new location. I want the link to stay at the old location.

Is there a way to stop the link changing when I use SaveAs, so that when I open Spreadsheet 2 it refers to the original location of Spreadsheet 1?

View 2 Replies View Related

Excel File Won't Break Links?

Jul 16, 2014

I copied 2 worksheets from one file to another and went in to "Edit Links" and changed the source to itself rather than the original file which took away those links in the cells that the original file was present in, but it still gives me a dialogue when opening the file that links to the original file. I go back to "Edit Links" and press "Break Link" but it doesn't seem to remove the link to the original file. If I click on "Connections", none are present. I clicked on "Startup Prompt" and set it so that it wouldn't annoy me with the prompt any more, but I'd ideally like to not have any reference to the original file.

View 3 Replies View Related

Unable To Break Links To Another File

May 8, 2006

Last week I copied a worksheet from one spreadsheet into another, and have since been working from the new one. When I open the file I get a message box asking if I want to Update links from the other workbook. But I've deleted all named ranges, formulae, shapes, everything that could possibly link to the other workbook. I've also (in my frustration) completely deleted the sheet that was originally copied and re-made it from scratch. But it STILL comes up with this update box. In Excel's Help it says to go to Edit/Links and press Break Link, which I have tried but it doesn't do a thing. The link is still sitting there in the display box in the Links window - it says that the Type is Worksheet, I don't know if this makes any difference that it's not a formula or anything?

Also, in complete desperation when it wasn't deleting the link, I changed the source to a random file, so it now comes up with an error in updating (which it obviously would) however this doesn't have any effect on my file because as far as I can tell it no longer has links to the other file! I'm tempted to just go to the option that says don't show the Update prompt on opening (the file is to be handed in as coursework on Wednesday) but this doesn't solve the problem, only bypasses it! Each time I made a major change (e.g. recreating the copied worksheet, changing the source) I saved the file under a different name, so I have all old copies just incase I've completely messed it up!

View 3 Replies View Related

Delete All File-references/links At Once

Jun 9, 2006

we work in a group on different excel worksheets. now we want to combine this sheets and get the following linkages in the files:

= 'I:[versuch_joe.xls]Koeffizient'!C156+'I:[versuch_joe.xls]Koeffizient'!C157*B25+'I:[versuch_joe.xls]Koeffizient'!C158*(LN('I:[versuch_joe.xls]Daten'!Y17)-LN('I:[versuch_joe.xls]Daten'!Y16))+'I:[versuch_joe.xls]Koeffizient'!C159*'I:[versuch_joe.xls]Daten'!R17+'I:[versuch_joe.xls]Koeffizient'!C160*('I:[versuch_joe.xls]Daten'!AE16+'I:[versuch_joe.xls]Daten'!AE15)

how can I delete all "[versuch_joe.xls]" that are not needed anymore? i got hundreds of them in my file.

View 3 Replies View Related

Remove Links In Workbook?

Dec 5, 2007

I have a workbook linked to another one. When I try to change the links to another book, I get a message ' the cell orchart your are trying to change is protected and therefore read only". I have checked and doubled checked and cannot find any worksheet that is protected. How can I find the problem cell or change the link to another book? I have the password but cannot find the worksheet?

View 2 Replies View Related

Detect Links Within A Workbook?

Jul 20, 2012

I have a workbook with a few worksheets. In sheet1 I have a few ranges which are linked to different parts in the other excel sheets.

Is there anyway to check if a range is being used as a link in another sheet.

Eg.

In sheet1 , A1 i have a value Apple.

In sheet2, A1 I have linked it to sheet1 A1.

is it possible to detect the link in sheet2 A1 from Sheet1 A1? I tried using Trace dependents but all it shows me is the link symbol? An arrow with a small excel sheet.

View 1 Replies View Related

Links Within Workbook Not Working

Nov 18, 2008

I have a workbook with a ton of links to other tabs, but all links and tabs are within the workbook (none to other documents). I've found that a lot of the links are no longer working. This document is only a month old, so it's not outdated or anything. i find myself having to go back and re-link everything. This is a big file...i understand if i have to re-link everything once, but i'm worried that the links will "break" again.

does anyone know why these links within a workbook are not working? is it something i have to fix in the Options?

View 9 Replies View Related

Break All Links To A Workbook

Jan 22, 2007

Somehwere in a review of your book, it referred to an add-in that attempts to break all links to a workbook. I looked on the site (microsoft) with the provided URL but could not find it. Is it still there? Does it work for EXCEL 2002?

View 4 Replies View Related

Variable File Name For Creating External Links

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

Automatically Update Links Only When File Exists?

Jun 2, 2014

I have a workbook that links to four files. I would like to automatically update the links when the file is opened and if the linked files are not available, don't display a message.

I got the first part done using the Options menu in Excel but can't figure out how to suppress the message when the linked files are not available

View 3 Replies View Related

Macro To Append Multiple Xls File In Single Workbook From Specified Path

Jan 25, 2010

I need a macro to do the following

1.Get list of .xls files from specified folder.

2.Append the files in new workbook in same folder.

Ex:
D:/users/excel/Sample_sheet1.xls
D:/users/excel/Sample_sheet2.xls
D:/users/excel/Sample_sheet3.xls

I want to get the list of Sample_*.xls and
create Sample.xls master file which adds the above three .xls as sheets in it.

Actually my macro as below

View 10 Replies View Related

Macro To Save Workbook By Referencing Cell In Another Workbook For File Name And File Path

Mar 21, 2013

I have got a master workbook and I have written macro to copy and paste data on another workbook. write a macro to save the new workbook to a file path with a file name where both file name and path are stored in master workbook sheet...

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

This Workbook Contains Links To Other Data Sources

Jan 23, 2014

My files always says this "This workbook contains links to other data sources" update.....how can I turn this off?

View 1 Replies View Related

Don't Update Links On Workbook Open

Aug 12, 2009

I have a workbook that has many cells that link to a server on the other side of the planet. If I manually open this workbook I get the "This workbook contains links to other data sources." And the option to "Update" or "Don't Update"

If I choose to not update, everything works great. If I choose to update, the worksheet takes 10-15 minutes to open. I have tried to go to tools-->options-->Edit and uncheck "ask to update automatic links" but this makes the default behavior updating. I want to open this workbook using a scheduled task and a batch file, and have it not update, and then run a macro. Any suggestions on how to do this?

View 4 Replies View Related







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