Is there a way of writing a formula to create a reference to an external spreadsheet? I have a folder containing 100s of workbooks all based upon a template. I can create a directory listing of this folder using a macro within Excel.
e.g.
Directory listing
C:My DocumentsReturnsFile1.xls
C:My DocumentsReturnsFile2.xls
C:My DocumentsReturnsFile3.xls
I would then like to use this list of file paths to create links to several different cells within worksheets contained in each of these. I know that if I did this manually for each worksheet the formula would be a variation on =[C:My DocumentsReturnsFile1.xls]Sheet!Cell. Is there a way that I can automatically create these external references? i.e using values in column A (directory listing) to create many external references, say in column B
I use my directory list and then a formula or macro populates automatically these external references? The file names in the directory change daily (100s of worksheets!) so I don't want to have to manually input these each time. If the folder containing the workbooks was held on an intranet would there be a similar solution?
I update files monthly and save them each month with a new name (eg. Jan, Feb, etc.).
In the file I have a reference from one tab to another tab within the same file. So every time I re-save this file with a new name, it should still reference the cell in the other tab - same file.
BUT on 2 occasions this reference changed to an "external" reference to the previous month's file.
I've been doing this every month for over 2 years and this problem has only happened 2 times. I know others that have experienced this, but nobody knows what caused it.
Does anyone know what would cause this? The biggest problem is that I may not notice this has happened for a long time.
One other thing I might add. I use an older version of Excel (2000). I share these files with other people who may have newer versions (I'm not sure who has what). Can sharing these files with others over a network system have something to do with this? Can opening "read only" when someone else is in the file and then saving as a copy do this?
I have an excel workbook we use for quoting jobs. All our pricing references are in another workbook on our network. I have reference in the 'quoting' workbook that refer to the 'pricing' workbook.
The trouble is, when some users open the 'quoting' workbook, and have another Excel file open, some references to the 'pricing' workbook change to the other file they have open.
I suppose there is some sort of replicable condition that is happening, but I can't figure out what is going on or why.
So my question is: Can I ' lock' an in-cell reference to an external workbook so that it NEVER changes?
I tried hand entering the reference (network location+workbookname+sheetname) into a cell and then referencing that cell, but I couldn't get that to work.
I am trying to use a conditional sum formula where the data resides in and external workbook. This is fine until I close the external workbook and the formula no longer shows the external reference. Is there a way of getting excel to use conditional sums in this way (or what is the best way of achieving this?)
I would like a defined name (1) in my excel document (A) to refer to another defined location (2) in an external document (B), which is a master document that will not move or be renamed. The main document (A) is one which will be copied to numerous locations within our company's network.
Therefore, I need the defined name (1) to have an absolute reference to the external document (B). At the moment I'm only able to get a relative reference, since Excel 'simplifies' the reference when both files are opened. Here is what I'm currently using: ='J:Invoice TemplateOffice list01 231106 List of offices.xls'!SiteNames
Need to create Working order (in Excel 2007) for filling machine in my factory. Working order is changeable from day to day and the deference is product quantity. Product quantity in working order [File - Working order] is changing according to the each sales plan [7-Jan-13, 8-Jan-13] - (File Working order is Linked to the appropriate sales plan in this case - [7-Jan-13]).
Anyway, I need to change the source workbook "sales plan" from [7-Jan-13] to [8-Jan-13] by changing source workbook name in red cell [File - Working order] and not to browsing location?
All source workbooks [sales plan 7-Jan-13, 8-Jan-13]are at the same location in the same folder, only difference is the source workbook names. So, is it possible to change source workbook name (File - Working order - red cell) for all external references (File - Working order - green cells) at the same time, and avoid annoying browsing?
I want to have a standing formula in Cells J2:M2 that will always reflect whats in those cells. I don't want to use transpose nor do I wnat something as simple as J2=+B5,K2=+B6,etc.
I would like to know if there is a formula that would add the values in a certain row to a cell
For instance:
I want J2 to reflect what is in B5 AND I want K2 To reflect what is in B5 plus a row which would be the value in B6. I have a reason for doing this as I am going to import 120 ranges beginning at a1 to I30 on each sheet while having the sheet I am importing to have these formulas starting at J2.
I tried using +cellnumber+row, but it just gave me the row number and not the actual value in that cell.
I am using Excel 2010. I am trying to make a spreadsheet where I can type in a date (02-19-2014), and pull in box scores from a basketball website. I have everything set up so that the date is parsed into (3) cells (02 19 and 2014) so that it can easily fit into the URL:
[URL]
As you can see, the month value in the URL is "02" the day value is "19" and the year value is "2014". What I want to be able to do is type in any date I want and return the box scores from that day in a new tab. I have everything done so that the new tab is automatically created and named, so my only issue is that I can't figure out how to input the day, month and year values automatically into the code for the Get External Data pull:
Code: 'Import from www.basketball-reference.com With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.basketball-reference.com/friv/dailyleaders.cgi?month=02&day=19&year=2014" _ , Destination:=Range("$A$1")) .Name = "dailyleaders.cgi?month=02&day=19&year=2014"
Below is my code which isn't formatting the cells it's suppossed to. It looks like it isn't doing anything. I think the issue might be with the highlighted section of my code, but when I go to "Manage" my rules for conditional formatting, excel references the appropriate cell under the "Applies to" section. I am using relative cell references for for the majority of the rest of the code and this section follows a section that selects the correct cell for this conditional format.
I'm trying to put together a dashboard that is referencing a table. Now the dash board I would like to have it so I can change a value and the details will update based off of my selection. This is all drived off of named ranges and have that working. The part I don't have working is dynamically changing what part of the table is being referenced to.
i.e. Say i have modeling quality I have a formula that looks like this
Which works perfectly. However if I change modeling quality to say modeling experience which has different criteria i need the formula to look like this
I want a total of column F based on criteria in column D and column K from the worksheet named in cell C9. I have put in the indirect function in the first part but am messing up the syntax in the second and third part of the formula. "Indirect(C9&" should be where 'Oct2009' is shouldn't it. Where am I going wrong with the following formula?
I've attached a sample document of my data layout. On the Compare tab, I'd like to build a sumif formula that takes the data in column B and uses it to reference the other tabs without having to use a large nested IF statement. For example, on the Compare tab, in cell C2, the formula will know to look at the "JAN MONTH" tab because B2 says "JAN", then the rest of the sumif would be looking at the data in column A and matching it with the data in column A in the correct tab.
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!
I would like to paste cells from a contiguous range to a non-contiguous range using a list of cell references as the target paste cells. Both the target and the source cells will be on the same sheet. The source cells will contain an INDEX/MATCH formula - the result in each cell is what I wish to copy then paste. I would like to activate the code by assigning the macro to a button.
The source columns look roughly like this:
Title Index/match result Cell reference to paste to
Text 1 23 B5
Text 2 Peter H7
Text 3 Continuous D11
Text 4 [BLANK] F7
Text 5 Membrane J12
....... ....... .......
Text 57 Yes K33
The Target columns are all over, as shown by column three above. I would like the code to run though the full list of index match results all the way to the last 'Text 57' - the code can either skip blanks or paste these also, I don't mind. I haven't written the INDEX/MATCH yet so it may return zeros if there is no data to pull.
I attach the full example here. Entry Form EG.xlsx
I want to link a number of cells on one worksheet back to another worksheet within the same workbook. Say everything from Cells A1 to M90.
I find the fastest way to do this link A1 on second worksheet to A1 on first worksheet (by using = and click on worksheet 1 Cell A1). I then click on cell A1 on worksheet 2, grab small square in bottom right hand side of cell, and drag accross to M1. While A1 TO M1 is still highlighted, I then grab small square on bottom of cell M1 and drag down to M90.
This makes all cells within this range reference back to worksheet1. In advanced settings I have unchecked for all blank cells to show a zero in woksheet 2.
Therefore I now have what I currently want, although I would like to make all reference absolute?
I tried doing this from the beginning again making A1 absolute at the start, but dragging the cells across and down does not provide the info I am looking for in all cells?
how to code to specify a cell in which to enter data into a spreadhseet, when the heading contains only one row.
In the attached example the headings contain multiple rows with merged cells, is there any way of overcoming this so that the entries are placed in the correct cells?
There are 100 loans, each one of them need to be tested on 11 different tests, the results are either "pass" or "fail". All the test results are stored in the Boolean array. g_sel_tag(). For instance, if g_sel_tag(2,7) = true that means the 2nd loan has failed on the 7th test.
But I got stock with the following code, I think there should be a loop for the public variable rep_num in order to loop through the 11 test results for each loan. I have searched the entire project but did not find any value was assigned to the variable rep_num. The following code is part of a huge project, I can't test run it to see if the following code is valid at this point.
I am new to VBA therefore wondering if it is valid with no specific value assigned to rep_num. (I think there should be something like "for rep_num = 1 to 11" in order to get it running).
There are several codes in the project with similar structure where they just use rep_num without assigning any specific values.
Code: Dim rep_num As Interger Sub test_results_reporter (rep_num As Interger) Dim i As Interger Dim g_sel_tag(1 to 100, 1 to 11) as Boolean For i = 1 to 100 If g_sel_tag(i,rep_num) Then Msgbox "Loan" & i & "has failed on test" & rep_num Next End sub
I have a big excel sheet with number plates and attributed to them: velocity, times, dates, etc. In the second external source i have csv with another data, now without anything more than number plate & car type. I want to merge this data in the way that i would have information of car type in the excel worksheet with number plates and dates (so essentially merge the second with the first.
It's more than possible that in the second file number plates will be attributed to more than one type of car, as this process was done automatically.
Due to the large number of VLOOKUP functions on my page of data whenever I try to save I get the following error codes. Excel cannot complete this task with available resources. Choose less data or close other applications. Unable to save external link values. The problem itself may not be solvable but is there away to prevent these messages from coming up when I save (or when it autosaves?)?
I have an external file that is a table with 4 columns and about 25 rows I would like to copy the contents of a file into a collection so I can analyze the data.
The problem is, I only know how to copy a whole line as a string and have no idea how to copy the data from the same line into different variables. I also have no idea how to define a collection array
I will explain
say my text (data.txt) file looks like this:
AB 0.5 20 2/2/07 CD 0.2 15 2/2/07 FE 0.4 40 2/2/07 (example of input)
I would like to create a collection called trade which I have defined like this (obviosly wrongly) Dim Trade() As Collection Dim bs As String Dim quant As Long Dim price As Single Dim calendar As String Trade.Add (bs) Trade.Add (quant) Trade.Add (price) Trade.Add (calendar)
so I would like to know how to define the collection array and how to input the data so that I don't have to insert a whole line into a string variable but can, instead break apart the line during the input stage
........Month Deal Name Deal Size Row1 May Row2 DrewDeal 50 Row3 DanDeal 100 Row4 Row5 June Row6 FankDeal 60 Row7 MaryDeal 200
I want to know can I output into another sheet the values based on the month. So I would have a drop down window with the months, and if I selected May, all the data from Row1 to Row 4 would show up. If I selected June all the data from Row 5 to Row 7 would show up
If I have the Same Table, I want to find out the Sum of the Deals in the months, so I want to create a table that shows the months, and then the SUM of the Deal Size Column.
Say I have Source Workbook X 1, and Destination Workbooks X 4. The Source workbook contains a number of lookup values. I want the lookup values to be maintained in the single Source workbook, and I want this workbook to remain closed when the end users are using their Destination workbooks. It is critical that certain cells in the Destination workbooks have validated data in order for formulas and summarizations to be correct.
I'm happy if the Destination workbooks contain a lookup worksheet (perhaps hidden). In short, I'd like the contents from the Source workbook, Lookups worksheet, to just be replicated "as is" into the Destination workbooks, Lookups worksheet. I then want to do my data validation from that worksheet, which of course is open (data validation appears to only work with open workbooks).
I've investigated the techniques in this link: [URL]
Questions:
1) Are the techniques in that link about the best approach? i.e. an external link plus array formulas?
2) A blank cell in the source workbook (text column but formatted as General) is resulting in a zero in the external link. How can I make the external link exactly match the text as entered in the source workbook?
I have the following code in Sheet1 for file Book7.xls
Private Sub Worksheet_Calculate()
On Error Resume Next
For Each rcell In Range("A1:D6") Select Case rcell.Value Case Is >= 5 rcell.Interior.Color = vbBlue Case Is < 5 rcell.Interior.Color = vbRed End Select Next rcell
End Sub
Range A1:D6 is linked to an external source file which I am changing every now and then.
A1 has the formula:
=[Book8.xls]Sheet1!A1*1
Copied all the way to D6.
[Book8.xls]Sheet1!A1:D6 presently has all values 1 hence the formatting in Book7 is all red.
Now I an changing source file to Book9.xls (thru EDIT menu->LINKS). [Book9.xls]Sheet1!A1:D6 has all values 10. But when I change external source to Book9.xls, the right formatting did not apply. All are still red (instead of blue). I still need to go in one of the cell and press F2 and F9 to trigger calculation.
How do I change the code in order to recognise the calculation in order to trigger the codes in the event?
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")
I M trying to get the lower values between to cells and have the lower valued cell highlighted,,,i have over 43 thousand lines of data to go throughand i was wondering if there was a quicker way to do this,,,for example cellA1 is $4.25 and cellA2 is $5.25 i want cell A1 to be highlighted,,is there a way?
What I have In Column B, I have the datesIn Column I, I have engineers name What I need I want a macro to generate Serial Nos. (1,2,3....... n) in column A If an only if the date in column B is today's date and the engineer's name matches with the PC's username