Hyperlink Won't Keep Reference When Sheet Names Change?
Apr 30, 2014
VB:
Sub RenameTabs()
For i = 1 To Sheets.Count
If Worksheets(i).Range("C1").Value <> "" Then
Sheets(i).Name = Worksheets(i).Range("C1").Value
End If
Next
End Sub
I change my tab names with the above but than my hyperlinks breaks.
View 4 Replies
ADVERTISEMENT
Jan 18, 2012
I have the following macro, which is assigned to ctrl+shift+h to allow users to make a list and to insert hyperlinks to other sheets that have more details than the list can show:
Code:
Sub linker()
Dim strDocument As String
Dim strSheet As String
Dim strAddress As String
Dim strLink As String
[Code] .......
I was surprised to see that even if the contents of the active cell is not a valid sheet name in the target document, the link is still inserted without error. If the link is subsequently clicked, the target document will open and an "invalid reference" error box will appear.
Is there any way to check whether the contents of the cell constitutes a valid sheet name in the target workbook at the point at which the hyperlink is created, without opening up the target document?
View 4 Replies
View Related
Oct 30, 2008
I'm working on a formula to get the the path of a picture on a different sheet in a workbook. I am trying to get use the hyperlink function to reference that cell on the the other sheet. It looks right but I get an error saying that it cannot open the specified file.
This is what my formula looks like:
=HYPERLINK(ADDRESS(4,12,2,,"Sheet 1"),2)
I need it to actually get the actual text value of the cell I am trying to reference. How would I do that?
View 12 Replies
View Related
May 11, 2006
I attach an example worksheet with the code I have thus far.
In my workbook I have other sheets, one of which changes and updates a specific one each time a new client's data is entered on said other sheet. Because I want to save the specific client's data and not lose it when another client's stuff is entered on this other sheet, I copy the sheet where the data is summarised (I called this sheet "Sheet to Copy From") to a newly inserted sheet and use Paste Special, Values Only to change all functions /f ormulae / Links ect to values.
I then change the name of the sheet to the name of the client.
I then use this sheet name / cell value to polulate a range on another sheet (Next Empty Cell) as a Hyperlink to the newly created sheet above. This sheet I called "Table of Contents".
how to code the hyperlink. Using Macro Recorder uses the specific case's names, but the Tab name to be used as Hyperlink value will always be the name of a new client,
View 8 Replies
View Related
Sep 7, 2007
I believe I have 99% of what I need. The code below has one bug. (See just the underlined text for a very quick overview. The rest is detail.)
My goal is to generate a TOC that:
1) has the VBA run from my Personal Workbook.
2) can be run in any worksheet of any open workbook.
3) can be run in a worksheet of any name.
4) will insert itself at the currently active cell.
5) has entries hyperlinking to the referenced worksheets - of any name.
Right now, I'm stuck with the last point. The macro below will generate the TOC at the currently active cell. The TOC will be hyperlinks to the referenced worksheets.
However, if the referenced worksheet contains a space, dash, or other special character then the generated hyperlink is broken. For example, if the referenced worksheet is "sheet1" then the hyperlink generated works just fine. However, if the referenced worksheet is "sheet-1" then the generated hyperlink doesn't work.
Sub IndexList()
Dim objSheet As Object
Dim intRow As Integer
Dim strCol As Integer
Set objSheet = Excel.Sheets
intRow = ActiveCell.Row 'Start writing in active row
strCol = ActiveCell.Column 'Start writing in active column
For Each objSheet In ActiveWorkbook.Sheets
Cells(intRow, strCol).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
objSheet.Name & "!A1", TextToDisplay:=objSheet.Name
intRow = intRow + 1
Next
End Sub
View 7 Replies
View Related
Mar 27, 2014
I would like to hyperlink the names in sheet 1 to the same names in sheet two. Is there a way I could do this using a formula rather that do each one by one?
View 3 Replies
View Related
Dec 4, 2007
I have a workbook with multiple sheets. There is an overview sheet and then 14 sheets allowing for 14 days worth of schedule information. There are then 3 sheets following the 14 days to total some information. The workbook users frequently change the sheet names of the 14 sheets to reflect days of the week.
I'm creating a copy for distribution that takes the active workbook and copies the values to a new workbook. There are columns that I would like to delete from the 14 day sheets and that would be easy enough if the sheet names were never changed.
The code I'm using currently follows (my thanks to Turtle 44 for helping on that section)
Sub Copy_Visible_Sheets()
Dim arr() As String
Dim i As Integer
Dim WB As Workbook
Dim WS As Worksheet
Set WB = ActiveWorkbook
Application. ScreenUpdating = False
'Make sure template is saved as .xls
If Not ThisWorkbook.Saved Then
MsgBox "Please save this workbook before generating a Client Copy."
Else
View 6 Replies
View Related
Aug 23, 2007
I have a workbook with a template worksheet. I can generate new worksheets using the Template, and create hyperlink to the new worksheet (Let's call it "New"). However, if an user changes the name of the worksheet from "New" to "SomethingElse", then the hyperlink breaks. How do I get the hyperlink to be automatically updated to "SomethingElse"?
View 4 Replies
View Related
Oct 7, 2013
Within one workbook I have 15 sheets, 13 are for separate divisions within the company, 2 are used to present sums across the 13 sheets. All 13 sheets have identical columns and rows, with unique numbers in each cell. Right now I am manually selecting the cells to reference in my master sheet, =sheet name!cell+sheetname!cell+sheetname!cell - so and and so on. How can I reference the sheet name once, and then all of the cells to SUM? =sheetname!(c4+c14+c24+c34) etc?
This would let me be able to copy the formula from cell to cell, and only have to change the sheet name each time.
View 3 Replies
View Related
May 21, 2014
Attached I have a document where I am wanting all of the individual sheet names on the Total page. Rather than having to change each formula to match the sheet name I believe there is a way to reference the sheet name column (AO) in the formula so you can drag it down to fill in the columns. I am basic with Excel and do not know how to add this indirect function into my current formulas.
View 5 Replies
View Related
Jan 27, 2012
Is it possible to change hyperlink as per the cell reference changed in a cell. for example :- in cell D2 the apply a match formula to find out a cell reference (eg "A"& Match function based on info type on cell A1) Now I want to create hyperlink as per the cell reference mentioned in cell D2. suppose I type Red in A1 and D2 give me the cell reference A51 than automatically Hyperlink create for A51. and it continiously changed whatever i type in A1 and what cell reference is showing in D2.
Sheet1ABCD1Type Abbrivation12Full FormACell AddressA13Is it possible that I click on Cell D2 and it goes to particular cell 45Abbrivation6Short CodeDescription71A82B93C104D115E126F137G148H159I1610J1711K1812L1913M2014N2115O2216P2317QExcel 2007Worksheet FormulasCellFormulaB2=VLOOKUP(B1,A6:$B$1000,2,0)D2="A"&MATCH(B1,$A$7:$A$1000,0)
View 3 Replies
View Related
Feb 22, 2010
I have got a workbook with about 200 sheets... Sheet1 > Sheet200
i need to delete about 100 sheets... sheet100 > sheet200
i then need to add the sheets back in but when i do the sheet numbers start from Sheet201... how do i get it to start from Sheet101 again or can i use some vba to change them later?
View 5 Replies
View Related
Sep 19, 2013
I have created 70 "templates" in my workbook. I would like to change the name of each template to the name contained on a list in the "Data" sheet. The list starts at a4, and may have 70 or more names. I want to cycle through each name, place it in cell c8 of the template, rename the template with the same name, then move on to the next name, rename the next template, place name in cell c8, and so forth. So far I have this, which creates the "template" and renames it according to the list, but it doesn't insert the name into cell C8 of each new sheet.
Sub NewSheets()
Dim I As Integer
Dim ws As Worksheet
Dim sh As Worksheet
Set ws = Sheets("Template")
[Code] ........
View 3 Replies
View Related
Dec 14, 2007
I am copying the entire contents of a worksheet onto a blank worksheet multiple times. The problem occurs with the charts which need updating once copied to reference the new worksheet name. I have tried stepping through each chart and then each SeriesCollection but it seems to fall over part way through.
View 2 Replies
View Related
Apr 29, 2014
I have an excel workbook that has many spreadsheets (each one sheet has a client name)I have another excel workbook that has these client names on one sheet (on a list) and next to every name I have a number (i.e total turnover of the year).
In the first workbook (where every client has his sheet (tab named after the client) I want to have a cell that equals to the sum of some cells on the other workbook, that refer to the specific client
(it looks like this ='[comissions NF 10-14.xls]comissions 14(auto)'!$J$81+'[comissions NF 10-14.xls]comissions 14(auto)'!$J$197+'[comissions NF 10-14.xls]comissions 14(auto)'!$J$313+'[comissions NF 10-14.xls]comissions 14(auto)'!$J$429)
I want this sum to be added to every sheet of this workbook. each sheet refers to a client, so $J$81, $J$197 etc must be changed for the correct cell that refers to the name of the client. The tab names are alphabetical and so s the list.
Is there any way to do it, without re-entering the formula to each one?
View 1 Replies
View Related
Feb 8, 2010
need to do to the below code so that when i drag the formula down it changes the sheet number....sheet1, sheet2, sheet3 and so on but keeps the cell reference the same?
View 4 Replies
View Related
Jan 11, 2008
I have a long list of tabs listing "projects" which have changing names - on the first sheet, I want to have the table of contents automatically update and link to each tab - I want the user to only have to change the tab name to have the table of contents and link update -
View 5 Replies
View Related
Jun 17, 2014
I have a small issue with hyperlink :
https://.../Search/QuickLink.aspx?n=A123-BCD-E-FGH-I456_JK789_0-12345&t=3&d=Main%5ceBProd&sc=Global&r=A12&cno=E_SOURCE&m=l
A123-BCD-E-FGH-I456_JK789_0-12345 - needs to be B2 cell value
A12 - needs to be C2 cell value
when I drag the function down, it has to pick B and C valued according to row. I am missing a mistake somewhere.
I last tried this function and it didn't work.
=IF($B2<>"",HYPERLINK("https://.../Search/QuickLink.aspx?n="$B2"&t=3&d=Main%5ceBProd&sc=Global&r="$C2"&cno=E_SOURCE&m=l","Open"),"")
View 3 Replies
View Related
Mar 31, 2014
I want to list file names from a directory and sub directories and hyperlink them. I have been able to list the file names onto an excel sheet, but I cannot get it to hyperlink to the file.
'Force the explicit delcaration of variables
Option Explicit
Sub ListFiles()
[Code]....
View 1 Replies
View Related
Oct 19, 2009
Is there a way to generically reference a directory when creating a hyperlink? By this I mean, I have an XLS that documents the flow of a process. As an outcome of this process, text files are generated.
This process may be run multiple times. I would like to be able to create multiple directories: Run1, Run2, Run3, ...
I would like to put a copy of the XLS in each directory. I would like to put the output files from each run into their respective directory.
I would like to put hyperlinks in the XLS that point to the flat files. However, when I add a hyperlink it contains the full directory path. Something like C:MyDocumentsRun1output1.txt.
So, if I copy the XLS into directory Run2, the hyperlink is still going to point to a data file in directory Run1.
How can I generically default to look in the 'current' directory for a file? Or is there a different/better way around this? ............
View 7 Replies
View Related
Jan 16, 2009
I want to be able to create a hyperlink in a cell that is the result of a simple reference formula. i.e. if cell A1 on worksheet A is a formula "='SheetB"!A1", can I create a hyperlink automatically from SheetA Cell A1 to 'SheetB'!A1?
I would like for the hyperlink to be is cell A1, so I beleive that would be a macro / VBA solution.
Also, is there a formula solution that could go in B1 "=hyperlink(A1)", where the formula will then recognize the referenced cell (rather that the formula result) and hyperlink to SheetB:A1?
View 9 Replies
View Related
May 7, 2012
Can I create data validation list of the names created in the name box or of the sheet tab names?
View 5 Replies
View Related
Oct 15, 2013
Code:
Sheets(Array("Sheet 1", "Sheet 2")).Visible = False
How do I convert the above to using Sheet Codes Names, Sheet1 and Sheet2?
Want to ensure my code will work if the user changes the sheet name.
View 2 Replies
View Related
May 21, 2013
I need a macro to create a hyperlink i.e....... I have an excel sheet with numbers in column A.....I have files in a folder that matches the numbers in column A....
How would I create a macro to create a hyperlink from the numbers in column A to the "matching" file names in a folder?
View 3 Replies
View Related
Jul 12, 2013
I have a workbook with many tabs and within those tabs there are many hyperlinks to other areas within the same workbook. When I add or delete lines or rows, the corresponding hyperlinks do not stay with the changed cell. Is there any way to make the cell reference in a hyperlink an absolute similar to how you do with a formula?
View 2 Replies
View Related
Mar 25, 2014
I need to create a Hyperlink to a static URL but then add a cell reference
The static url is known - [URL]
A column in my spreadsheet contains the data needed to add to the end of the static URL - so it would look like [URL]
I tried this
=HPYERLINK("www.helloworld.com)+B2,Link - but it is not working :-(
View 1 Replies
View Related
Jan 23, 2010
I am having problems in Excel 2007 using hyperlink formula to jump to a different worksheet in the same workbook.
Filename: Model Variables.xlsx
Worksheet to seek: Org Structure
Cell to seek: A1
Formula tried: =HYPERLINK("[Model Variables.xlsx]Org Structure!B4", "My Cell on different sheet")
Error: Reference is not valid
View 11 Replies
View Related
Sep 30, 2013
I have a list of University courses listed in Sheet1. Column A contains a unique course code. If there is a problem with a course, a second worksheet (called Anomalies) contains the same unique course code with description of the problem(s).
What I'm trying to do is: in Sheet 1, create a hyperlink to the relative cell in Sheet 2 that shows the course code and description. I've gotten close, but am not sure how I can do this without having to update two formulas. In short, I can't find a way to combine the two formulas.
What I've done is the following: in Sheet 1, column B, created a HYPERLINK formula, thus: =HYPERLINK("#"&CELL("address",INDIRECT(C54)),A54)
Column C contains a formula to lookup the relative position in the Anomalies worksheet, which can be referenced back to the HYPERLINK formula, thus:
=("Anomalies!A"&MATCH(A54,Anomalies!A:A,0))
Sheet1 is fairly static, but Sheet2 (Anomalies) is being updated all the time. I could just hide column C and then column B will update based on that, but I'd prefer a cleaner solution.
I've tried joining the two formulas, by replacing the INDIRECT part with the second formula, as per the following: HYPERLINK("#"&CELL("address","Anomalies!A"&MATCH(A54,Anomalies!A:A,0)),A54)
but I get an error.
View 5 Replies
View Related
May 1, 2008
Two part question:
1) I'm relatively new to arrays, but what I need to do is generate a list of file names and the sheets within each one. I would like to use an array for this, but since I don't have much experience.... well....that's why I'm here. Can someone point me in the right direction?
2) And the second part of this.... I was planning on using the FileSystemObject to determine the files in a selected folder and loop through that list of files, opening each one and harvesting the required info (file name and all sheet names). Should I use the FSO or is there something built into Excel that might be better (and also limit the number of dependencies for this little "project" of mine).
View 9 Replies
View Related
Feb 25, 2011
Is it possible to produce a list on a new worksheet of all sheet names and their their internal names within a workbook?
If so I would like the tabbed name's to begin in say A2 with the corresponding internal name in B2.
View 3 Replies
View Related