IF function and Hyperlink
Solved
Gpa2Bol
-
Mike-31 Posted messages 18405 Registration date Status Contributor Last intervention -
Mike-31 Posted messages 18405 Registration date Status Contributor Last intervention -
Hello,
For some time now, I've been stuck on combining "IF function and Hyperlink" in Excel.
What I want to do is access the desired cell (A186) in my sheet directly so that I don’t have to navigate through this same sheet which is quite loaded with information. However, when I enter the formula, it seems correct but doesn't lead anywhere. The hyperlink is active, but when I click on it, nothing happens.
To better visualize, I am leaving a copy of my formula.
=IF(L4="Input mentioned in % IDV Monthly", HYPERLINK('[Renseignement_IDV_2013]Renseignement IDV 2013'!A186), "")
Another piece of information, the link should take me to this same sheet without changing the file. I just want to access this cell A186.
If anyone has any information, I would be grateful, and I thank any person who might have the answer in advance.
For some time now, I've been stuck on combining "IF function and Hyperlink" in Excel.
What I want to do is access the desired cell (A186) in my sheet directly so that I don’t have to navigate through this same sheet which is quite loaded with information. However, when I enter the formula, it seems correct but doesn't lead anywhere. The hyperlink is active, but when I click on it, nothing happens.
To better visualize, I am leaving a copy of my formula.
=IF(L4="Input mentioned in % IDV Monthly", HYPERLINK('[Renseignement_IDV_2013]Renseignement IDV 2013'!A186), "")
Another piece of information, the link should take me to this same sheet without changing the file. I just want to access this cell A186.
If anyone has any information, I would be grateful, and I thank any person who might have the answer in advance.
6 answers
Hello
the hyperlink must be placed in quotes
HYPERLINK("[workbook name]sheet name!celladdress")
Regards
--
"Imagination is more important than knowledge." A. Einstein
the hyperlink must be placed in quotes
HYPERLINK("[workbook name]sheet name!celladdress")
Regards
--
"Imagination is more important than knowledge." A. Einstein
Hello,
I think the link text needs to be modified as follows:
=IF(L4="Input mentioned in % IDV Monthly",HYPERLINK("[Renseignement_IDV_2013.xlsx]'Renseignement IDV 2013'!A186");"")
Put double quotes around the entire link text
Use single quotes for the sheet name because there are spaces
Add the file extension
To be tested
Best regards,
I think the link text needs to be modified as follows:
=IF(L4="Input mentioned in % IDV Monthly",HYPERLINK("[Renseignement_IDV_2013.xlsx]'Renseignement IDV 2013'!A186");"")
Put double quotes around the entire link text
Use single quotes for the sheet name because there are spaces
Add the file extension
To be tested
Best regards,
Hello everyone,
First of all, I want to thank you for your precious help.
However, either I understand nothing, in which case I should be worried :-), or my Excel is buggy?
I've typed the different formulas you provided, but none of them work.
So, I'm leaving you my email address and I've set aside a draft of my workbook in case the problem interests you and if I'm not bothering you.
Thank you in advance.
First of all, I want to thank you for your precious help.
However, either I understand nothing, in which case I should be worried :-), or my Excel is buggy?
I've typed the different formulas you provided, but none of them work.
So, I'm leaving you my email address and I've set aside a draft of my workbook in case the problem interests you and if I'm not bothering you.
Thank you in advance.
Good evening and thank you to via55 for your help.
As requested, I am providing the link to my simplified file.
A little additional information, the formula I want to obtain will only be the launch of my "if function + hyperlink" but I need this functional start in order to understand the mechanism to reproduce it later. As a reminder, the target cell is A186.
(concerned part in blue).
Here are the tested formulas that did not work:
=IF(L4="Input mentioned in % IDV Monthly",HYPERLINK("Renseignement IDV 2013!A186"),"")
and
=IF(L4="Input mentioned in % IDV Monthly",HYPERLINK("[Renseignement_IDV_2013.xlsx]'Renseignement IDV 2013'!A186"),"")
http://cjoint.com/?0JDwjkPyk0j
Thank you again and have a good evening!!
(PS: if you need more information, here is my email: ***@***)
As requested, I am providing the link to my simplified file.
A little additional information, the formula I want to obtain will only be the launch of my "if function + hyperlink" but I need this functional start in order to understand the mechanism to reproduce it later. As a reminder, the target cell is A186.
(concerned part in blue).
Here are the tested formulas that did not work:
=IF(L4="Input mentioned in % IDV Monthly",HYPERLINK("Renseignement IDV 2013!A186"),"")
and
=IF(L4="Input mentioned in % IDV Monthly",HYPERLINK("[Renseignement_IDV_2013.xlsx]'Renseignement IDV 2013'!A186"),"")
http://cjoint.com/?0JDwjkPyk0j
Thank you again and have a good evening!!
(PS: if you need more information, here is my email: ***@***)
Indeed, it's impossible to get the hyperlink to work despite several attempts:
creating a new workbook with a copy of the data and saving before inserting the hyperlink; it works once but not thereafter...
There seems to be a bug with hyperlinks depending on the versions of Excel.
Hence, I propose an alternative solution with a macro (more efficient and safer).
https://www.cjoint.com/?0JEa0XG90sU
Macro placed in the Worksheet of the sheet.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 12 Or Target.Row <> 5 Then Exit Sub ' if it's not the cell in row 5 column 12, nothing happens.
If Cells(4, 12).Value <> "Saisie évo en % IDV Mensuel" Then Exit Sub 'if something other than Monthly Input in L4, nothing happens either.
' otherwise, position to cell row 186 of column 1
ActiveSheet.Cells(186, 1).Select
End Sub
A double-click in L5 therefore redirects to A186 if the correct choice is made in L4.
Best regards.
creating a new workbook with a copy of the data and saving before inserting the hyperlink; it works once but not thereafter...
There seems to be a bug with hyperlinks depending on the versions of Excel.
Hence, I propose an alternative solution with a macro (more efficient and safer).
https://www.cjoint.com/?0JEa0XG90sU
Macro placed in the Worksheet of the sheet.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 12 Or Target.Row <> 5 Then Exit Sub ' if it's not the cell in row 5 column 12, nothing happens.
If Cells(4, 12).Value <> "Saisie évo en % IDV Mensuel" Then Exit Sub 'if something other than Monthly Input in L4, nothing happens either.
' otherwise, position to cell row 186 of column 1
ActiveSheet.Cells(186, 1).Select
End Sub
A double-click in L5 therefore redirects to A186 if the correct choice is made in L4.
Best regards.
```vba
Sub MacroDirecte()
If Range("L4").Value = "saisie évo en % IDV Mensuel" Then
Range("A186").Select
ElseIf Range("L4").Value = "Saisie évo en % IDV Excercice" Then
Range("A196").Select
ElseIf Range("L4").Value = "Saisie évo en % IDV 12 Derniers Mois" Then
Range("A205").Select
End If
End Sub
```
Hello,
The macro: (which you can adapt for other cells by copying a line and changing the coordinates within the parentheses)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 12 Or Target.Row <> 5 Then Exit Sub ' if it is not the cell in row 5 column 12 nothing happens
If Cells(4, 12).Value ="Input mentioned in % IDV Monthly" Then ActiveSheet.Cells(186, 1).Select : Exit Sub 'if Monthly Input in L4 position on cell line 186 of column 1
If Cells(4, 12).Value ="Input mentioned in % IDV Financial Year" Then ActiveSheet.Cells(196, 1).Select : Exit Sub
If Cells(4, 12).Value ="Input mentioned in % IDV Last 12 Months" Then ActiveSheet.Cells(205, 1).Select : Exit Sub
End Sub
Regards
The macro: (which you can adapt for other cells by copying a line and changing the coordinates within the parentheses)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 12 Or Target.Row <> 5 Then Exit Sub ' if it is not the cell in row 5 column 12 nothing happens
If Cells(4, 12).Value ="Input mentioned in % IDV Monthly" Then ActiveSheet.Cells(186, 1).Select : Exit Sub 'if Monthly Input in L4 position on cell line 186 of column 1
If Cells(4, 12).Value ="Input mentioned in % IDV Financial Year" Then ActiveSheet.Cells(196, 1).Select : Exit Sub
If Cells(4, 12).Value ="Input mentioned in % IDV Last 12 Months" Then ActiveSheet.Cells(205, 1).Select : Exit Sub
End Sub
Regards
Hello to both of you,
For your information:
I just tested with the formula I suggested and it works perfectly on my end. Of course, the sheet needs to be renamed 'Renseignement IDV 2013' and the workbook should be called Renseignement_IDV_2013.xlsx
I have Excel 2010
Best regards,
For your information:
I just tested with the formula I suggested and it works perfectly on my end. Of course, the sheet needs to be renamed 'Renseignement IDV 2013' and the workbook should be called Renseignement_IDV_2013.xlsx
I have Excel 2010
Best regards,
Hello Pilas,
I just copied and pasted your formula but it's still glitching. It must be my Excel that has a little problem. As for the proposed macros, let's hope that Open Office can support this type of functionality since I'm creating the spreadsheet in Excel but it will need to be compatible with the .ods format.
Best regards.
I just copied and pasted your formula but it's still glitching. It must be my Excel that has a little problem. As for the proposed macros, let's hope that Open Office can support this type of functionality since I'm creating the spreadsheet in Excel but it will need to be compatible with the .ods format.
Best regards.
Hello to both of you,
Thank you very much for your help, I opted for the macro solution.
Thanks again!! :-)
Thank you very much for your help, I opted for the macro solution.
Thanks again!! :-)
Hello,
I had a possibility without a macro, which I tried to post unsuccessfully, here it is anyway if it is taken into account
https://www.cjoint.com/?CJEibnOhlpt
See you
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.
I had a possibility without a macro, which I tried to post unsuccessfully, here it is anyway if it is taken into account
https://www.cjoint.com/?CJEibnOhlpt
See you
Mike-31
A period of failure is a perfect time to sow the seeds of knowledge.