Link Reference From A String In A Cell
Jul 27, 2006
I need to have a link to data in another file. The file will be in the same directory, however, the name of the file I need to link increments daily. I have a string being generated already with the name of the file I want to link to. I can easily add a cell reference to that string, but how do I use that string value in a link? Or - how do I use quick'n'easy VBA to snatch the required cell's data?
e.g.
Required data is in the file "production 060723.xls", in sheet "Daily Production", in cell "E2". Current file has a string being generated in a cell:
"\server1production dataproduction060723.xls"
The following day, the required data will be in a file called "production 060724.xls", same sheet, same cell. The current file's string data will also update to reflect the needed file. I know that similar questions have been asked here - but none that I saw in my search seemed quite what I need. Even if someone can direct me to the right thread, that would be great.
View 5 Replies
ADVERTISEMENT
Aug 28, 2007
I have 6 worksheets that are identical cosmetically. Each has the same drop down box list with the same name (dropdown1), however the cell link on each sheet is different. (ie. sheet1 dropdown1 cell link refers to a sheet ' lookup' cell $K$1, sheet2 dropdown1 cell link refers to sheet 'lookup' cell $K$2, etc.) I have the same command button in each sheet that performs the same task so I wanted to keep one module for all 6. Problem is I set a variable to the cell link in the code, and this has to be changed.
DropDownValue = Sheets("Lookup").Range("K1").Value
Is there any way I can set this variable using a property of the drop down list?
DropDownValue = dropdown1.celllink
I don't want to create 5 more duplicate modules just to change this one bit of code (I only use it this time in the code!). If there is no way to get the cell link value of the drop down, could I possibly put a worksheet change event on the lookup sheet to populate a certain static cell with the value of the last cell change?
View 2 Replies
View Related
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
Feb 24, 2014
I currently have a file that is linked to an external workbook that is referencing a certain cell from a certain tab. The below is what Column A & B look like right now. What I'm wanting to know is is there a way to have the formula in Column B automatically reference the name in Column A (which is the tab name in the external workbook) instead of having to manually change the formula when the value in Column A changes?
In other words, I want everything in the external reference formula to remain the same except have the person's name change dynamically...
Mary
='X:Anderson CorporationEmployees[Work Hours]Mary'!$F$42
Joe
='X:Anderson CorporationEmployees[Work Hours]Joe'!$F$42
Frank
='X:Anderson CorporationEmployees[Work Hours]Frank'!$F$42
Michelle
='X:Anderson CorporationEmployees[Work Hours]Michelle'!$F$42
Sam
='X:Anderson CorporationEmployees[Work Hours]Sam'!$F$42
View 1 Replies
View Related
Oct 10, 2008
I'm trying to switch my vlookups to something more dynamic. I keep adding columns to the data sheet (sheet1 for these purposes) and so I have to go back and update all of the other sheets that use the vlookup. (I'll just give an example as sheet2 for these purposes)
So what I have currently:
=VLOOKUP(A5,Data_All,4,FALSE)
Basically the 'A' column in sheet2 has an integer value, and so the vlookup takes that integer and looks up on sheet1 which row corresponds to that integer and then returns that string value.
What I want:
='AO_Cat_' & 'A5'
Basically I have named every cell in sheet1 and the particular value that I want to pull is named "AO_Cat_%name" with the last part being the integer value. I don't know if that make sense or not. For example, on sheet2, A5 might be '16' and so the value that I want to pull is "AO_Cat_16"
If I were to do this from the VBA side of things, then it'd be a simple range("AO_Cat_" & id_number) where id_number was the lookup value. However, I'd prefer to have this directly as a worksheet formula for simplicity purposes.
View 9 Replies
View Related
Jul 6, 2008
I'd like to check if a user supplied string is single cell reference. My problem is that the below code comes back as vallid if I enter a range like B2:B4.
Sub test2()
Dim UserAdd As String
UserAdd = InputBox("Enter your address")
'check if valid:
If ValidAddress(UserAdd) Then
MsgBox ("it's valid!")
Else
MsgBox ("it ain't valid!")
End If
End Sub
View 9 Replies
View Related
May 18, 2007
I have something like the following:
If Worksheets("RawData"). Cells(1, nColumn).Value = Worksheets("RawData").Cells(12, 16).Value Then
..do code (I know the cell location of interest at this point)
End If
Then I End up needing To Do something Like the following
ActiveChart.SeriesCollection(1).XValues = _
Worksheets("RawData").Range("L1:N1")
“L1:N1” above is a sample. Given the code above it I have the cell location in question but it is in the format such as .Cells(12,16). That doesn’t do me much good when range wants something like “L1”. I don’t know how to convert that (12,16) to a L16 for example.
View 7 Replies
View Related
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
Dec 1, 2013
I have created 10 Hyperlinks in sheet 1. And all these links in the same sheet. When i copy the same sheet to sheet 2, the sheet 2 hyperlink is related or is reffered to sheet. Is it possible that when we copy teh sheet to next sheet, the hyperlink also gets copied with the sheet number
View 2 Replies
View Related
Jun 28, 2013
I have two worksheets, one with detail monthly information and one with YTD information. So let's say the three numbers I want to capture in the YTD sheet are in columns B, G and I on the monthly sheet. January's data might be in B5, G5 and I5. February's data is in B12, G12 and I12 and so on.
On the YTD sheet in cell C2 I link to Monthly!B5 and in C3 I link to Monthly!B12 so cells C2 to C13 on the YTD sheet show the monthly totals from column B on the detail sheet. On the YTD sheet, cells C20 to C31 show the monthly totals from column G on the monthly sheet, so cells G5, G12, etc. And finally, cells C40 to C51 on the YTD sheet show monthly totals form column I on the monthly sheet.
In the past I've always created all these links manually. After creating the links in C2 to C13 on the YTD sheet, is there a way to use a formula in C21 that uses the link in C2 to create a link for G5?
View 6 Replies
View Related
Jul 1, 2013
I have a formula in a cell which is refered to other cell within the same sheet and also to other sheet from other file. say
C1 = A1+B1+data file c1 Data file is another file in other location.
I was trying to break a external reference link (from Data File) from Data _ Edit Link, but it is converting all the formula to value. How is it possible to break only the external link without damaging the formula within the sheet say c1 = A1+B1+26 (value from data file c1)
View 5 Replies
View Related
May 27, 2014
I have the following formula in my workbook:
=COUNTIF('\caltulfs1DATAProjectsF2014FB-979916 - EQUATE7.0 DOCUMENTATION7.01 DOCUMENT REQUIREMENTS & RECORDS[FB-979916 DSI FORM.xlsm]Customer Tracking'!A12:A86,"past due")
When I open the master file I want my links to automatically update and open the referenced files without having to open the source document for each value. Can this be done
View 3 Replies
View Related
Oct 9, 2008
I want to make a lookup on a string of words from one of my worksheets and I also whant to make a hyper link so that when I click on the lookup command I should pop to the other worksheet were my database is.
View 2 Replies
View Related
Nov 17, 2013
I have a list of web address in column A. All of the web address belong to the same site and are different products at the store. I want to be able to some how launch the sites and have Excel copy the text string which follows the word "PRICE:" on the site back into Excel into the corresponding cell of column B.
View 3 Replies
View Related
Jun 11, 2008
anyone know how to refer to text in a string? vba
View 9 Replies
View Related
Feb 28, 2013
Here is the scoop.
I have a userform that has a lot of textboxes that are formatted as date fields. Some of them have a default value and are locked=true, enabled=false. For those ones I have a checkbox next to them so the user can unlock and enable the textbox if they so desired.
Well the checkboxes and textboxes have a similar naming scheme, but are not numeric (they are not CheckBox1, CheckBox2, etc). As an example they one grouping is Cust1RelExpUnlock (this is the checkbox) and Cust1RelExpDateBox (this is the textbox). The difference in their name is the last portion (Unlock or DateBox).
Now when the checkbox is selected the code I want looks something like this:
Code:
Private Sub Cust1RelExpUnlock_Click()UnlockDateBox Cust1RelExpUnlockEnd Sub
Where UnlockDateBox is the function I'm having difficulty with and is supposed to be generic enough to work on any grouping assuming my naming scheme is consistent.
Using a combination of the Left() and Len() functions I can get the unique aspects of the name. Then concatenate it with "DateBox" as required. However I'm getting type mismatch errors, or object required erros. I tried various combinations of Dim _____ As Object, As Control, As Textbox... with no success.
I'm getting the correct name as a string, how do I make it work so I can reference the textbox.enabled/.locked?
Code:
Private Sub UnlockDateBox(Ck)
Dim CkDate As Control 'Tried control, textbox, object
Set CkDate = ProjectInputForm.MultiPage1.Object ' tried just using ProjectInputForm, and Object
Dim CkName As String
[Code] .........
View 4 Replies
View Related
Apr 18, 2014
I have an endless list of information that I need to turn into a text string, lookup with a validation on the end.
The easiest way is to show you so I've attached the info and what result I want.
Attached File : Test.xlsx‎
View 3 Replies
View Related
Feb 8, 2011
I am running EXCEL 2007 on XP. What is the EXCEL cell formula to put in a cell (for example"E5") that will reference the "last" occurrence of a specific text string in column A (For example Chard ) but will show its corresponding column B content (for example its PH number 3.45) regardless of the number of data entries that will be inputted in the future for both column A and B.
A B C D E
1WINEPH
2Chard3.24
3Merlot3.36
4Cab 3.44
5Merlot3.38 xxx
6Chard3.26
7Chard3.45
8Cab 3.41
9 Merlot3.33
10
View 7 Replies
View Related
Jan 8, 2012
How do I change a formula cell reference based on another cell's reference? I'm building a schedule that looks to a task's trigger and adds days based on that relationship. All entries in column "A" will be text and all cells in "B" will be the simple formula "=A2" or "=A3". Due date is calculated by adding the value in "C" to the preceding date in column "D". In the spreadsheet below, the trigger for "Budget set" is "Specs written" with 3 days added to the previous due date.
________A________________B_____________C_________D
1 Task___________Trigger_____________Days_____Due Date
2 Design begins__Proj OK______________10____10-Jan
3 Specs written__Design begins (A2)____5____15-Jan (D2+C3)
4 Budget set_____Specs written (A3)____3____18-Jan (D3+C4)
If the trigger for A4, "Budget set", changed from A3 to A2, is there a way that the formula that determines the due date in D4 could read the trigger cell reference in B4 so that the value in the corresponding row in column "C" is added in the date column?
View 4 Replies
View Related
Apr 7, 2014
In sheet1 I have a simple database consisting of 5 columns of data
Column A : Name ie James Jones
Column B : payroll number ie 123456
Column C : shift times ie 1245-2124
Column D : job title ie floor
Column E : comments ie A/L or 0600-1500
what I would like is some code that will go down Column E and if a 'time string' ie 1300-2130 is found then copy this string and paste into corresponding value in column C. If a text string is found ie A/L or Sick or anything like this then ignore and move onto next cell, loop this until all cells in column E have been checked.
View 4 Replies
View Related
Mar 11, 2009
I have a table that displays data from another worksheet. This is what the cell reference behind the table look like:
View 2 Replies
View Related
Feb 15, 2010
I have lets say 12 months of data. I have formulas that reference the latest 6 months. When I insert a new column to input a new month, how can I make the formulas include the new months without manually updating them.
EXAMPLE:
12 months of data exist in cells B3:M3 going from B3(oldest) to M3(newest). Formulas reference latest 6 months of data in cells H3:M3. When a new month hits, I insert a column after column M.I would like the formulas to now reference cells I3:N3 which is now the newest 6 months.
View 14 Replies
View Related
Jul 20, 2014
I have a workbook with 1000+ worksheets, all of which have 3-letter names. On a master sheet, I would like to make a query of how many non-empty cells there are on a subsidiary worksheet. This works:
Code:
=COUNTA(ABC!A:A)
What I'd like to do from time to time is input in column A a varying set of 3-letter worksheet names, say
AAB
ABC
CDE
And have a formula in column B that converts this to
=COUNTA(AAB!A:A)
=COUNTA(ABC!A:A)
=COUNTA(CDE!A:A)
I've learned that simply substituting the cell references A1, A2, A3 for AAB, ABC and CDE doesn't work. What do I need to do to achieve this?
View 2 Replies
View Related
Apr 25, 2014
Let's say I've ended up with the number 8 in Cell D4 for example. Is there a formula that can return the letter "G" (The 8th Column) so I can use it in future cell references ? If so, let's say we store that in Cell B5. How do I now refer to a cell in a chosen Row of that same Column by reference to Cell B5 ? For example if I want to refer to Cell G33 can you refer to this Cell in some form like Cell(Contents of Cell B5;33) ??? Don't want to use R1C1 type references if possible.
View 9 Replies
View Related
Feb 18, 2014
I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.
View 2 Replies
View Related
Aug 12, 2014
I have a column who's content is determined via about 6 nested if statements from data on that row. That cell is then conditionally formatted to a certain color based on the text that is ultimately printed from the nested ifs (simply an extra visual legend for the text). All of this contributing info and about 1000 lines items make a very large and difficult to print page. What I am trying to do is a make a summary sheet that simply takes the index number of these 1000 rows and copies or links the conditional formatting of the mentioned cell onto this number on another sheet. I have already linked this status cell and put it adjacent to the index number which works well in that with two columns I can show the index and status but if I could combine the color of the status cell onto the index cell, it would be even better. I am pretty sure another conditional format for this summary sheet would not be possible or be extremely complex since the contents of the index cell I am conditionally formatting have no bearing on the conditions for the format. Was hoping there is some VBA magic that could simply mimic the conditional formatting from one cell and put it on another.
View 1 Replies
View Related
Jun 3, 2008
I have a macro that inputs a sheet and cell from the user. when the macro tries to make a formula it outputs =data!'AE3'. I need it to output =data!AE3
Dim Sheet As String
Sheet = InputBox("Take Data from where?")
Dim startcell As String
startcell = InputBox("Start Cell?")
ActiveCell.FormulaR1C1 = "=" & Sheet & "!" & startcell & ""
View 3 Replies
View Related
Nov 17, 2008
I would like to have a link in a merged set of cells that puts the insertion point to another cell. Scenario: In cell k30, the user puts in the amount of credit card debt a individual has, and scripts the user based on that information. Later on, they get a more accurate running total of the amount of debt and need to change the amount in k30 for an accurate quote. After ther running total, in cell j172(a merged box for instructions) i instruct the user to be sure to enter the new total in cell K30.
Questions:
1. Is there a way to put a button or a link that would put the insertion point back up to K30 automatically, but allow the user to change it themselves and not change it automatically?
View 2 Replies
View Related
Aug 27, 2009
I would like to ask if there's a way that i can create a link in a cell to another cell. Sample: in cell A1: there's a word "click to go to cell A150" in this case i dont have to use scroll down to go to cell A150.
View 2 Replies
View Related
Apr 29, 2014
I have a column on a spreadsheet containing the last four (XXXX) or in some cases six (XX-XXXX) if there are duplicates of the last four SSN. I manually enter these as needed. I also create a folder that will be named the last four or six in the same format that is in the excel spreadsheet. Is there a simple way to automate the linking of these cells to the external folders?
View 3 Replies
View Related