![]() |
updating hyperlink
I have a worksheet which uses a function to get value from a different
cell. =if (SheetName! CellName < "",SheetName! CellName, "") ----syntax =if(Log!A5<"",Log!A5,"")----actual code snippet I have then hyperlinked the cell to the same cell from where it is getting the value ie A5. Problem: Whenever I insert rows, the reference gets updated but I have to manually adjust the hyperlink to A6 say(row is added before A5). Is there a way of adjusting that through VBA? It would be awesome if I could get some help here, as I have to update the hyperlinks for more than thousand places. Thanks, Nasir. |
updating hyperlink
You could name the cell (range) and refer to that. Names references are
updated as rows/columns are added and removed. -- Cheers Nigel wrote in message oups.com... I have a worksheet which uses a function to get value from a different cell. =if (SheetName! CellName < "",SheetName! CellName, "") ----syntax =if(Log!A5<"",Log!A5,"")----actual code snippet I have then hyperlinked the cell to the same cell from where it is getting the value ie A5. Problem: Whenever I insert rows, the reference gets updated but I have to manually adjust the hyperlink to A6 say(row is added before A5). Is there a way of adjusting that through VBA? It would be awesome if I could get some help here, as I have to update the hyperlinks for more than thousand places. Thanks, Nasir. |
updating hyperlink
try using absolute reference $A$5. hth
" wrote: I have a worksheet which uses a function to get value from a different cell. =if (SheetName! CellName < "",SheetName! CellName, "") ----syntax =if(Log!A5<"",Log!A5,"")----actual code snippet I have then hyperlinked the cell to the same cell from where it is getting the value ie A5. Problem: Whenever I insert rows, the reference gets updated but I have to manually adjust the hyperlink to A6 say(row is added before A5). Is there a way of adjusting that through VBA? It would be awesome if I could get some help here, as I have to update the hyperlinks for more than thousand places. Thanks, Nasir. |
updating hyperlink
Thanks Nigel. Do I have to name all the cells for that purpose? is
there any way of doing that through some code? Nigel wrote: You could name the cell (range) and refer to that. Names references are updated as rows/columns are added and removed. -- Cheers Nigel wrote in message oups.com... I have a worksheet which uses a function to get value from a different cell. =if (SheetName! CellName < "",SheetName! CellName, "") ----syntax =if(Log!A5<"",Log!A5,"")----actual code snippet I have then hyperlinked the cell to the same cell from where it is getting the value ie A5. Problem: Whenever I insert rows, the reference gets updated but I have to manually adjust the hyperlink to A6 say(row is added before A5). Is there a way of adjusting that through VBA? It would be awesome if I could get some help here, as I have to update the hyperlinks for more than thousand places. Thanks, Nasir. |
updating hyperlink
Since you want the hyperlink for the same cell as referenced in the
formula you could use the HYPERLINK Worksheet Function. - --- HTH, David McRitchie, Microsoft MVP - Excel My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "JLGWhiz" wrote in message ... try using absolute reference $A$5. hth " wrote: I have a worksheet which uses a function to get value from a different cell. =if (SheetName! CellName < "",SheetName! CellName, "") ----syntax =if(Log!A5<"",Log!A5,"")----actual code snippet I have then hyperlinked the cell to the same cell from where it is getting the value ie A5. Problem: Whenever I insert rows, the reference gets updated but I have to manually adjust the hyperlink to A6 say(row is added before A5). Is there a way of adjusting that through VBA? It would be awesome if I could get some help here, as I have to update the hyperlinks for more than thousand places. Thanks, Nasir. |
All times are GMT +1. The time now is 12:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com