Hyperlink formula to sheet not Working

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
Platform
  1. Windows
I have a hyperlink value, but when I click on the hyperlink, I get an excel security warning message and when I click on Yes, It says it cannot find specified file


However, If I right click and manually create a hyperlink to the sheet, it works

Code:
 =IF(A14="% of Sales","",IF(OR(A14="Grand Total",B14=""),"",HYPERLINK(INDIRECT("A14"),OFFSET(A14,0,0))))


it would be appreciated if someone can kindly assist me
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
thanks for the reply


I have a text names in A14 to A30 that refer to sheet names for eg BR1, Br2 etc


Please see my sample data below


Kindly amend my code



Book1
ABCDEF
14BR1BR1
15BR2BR2
16
17
18
19
20
21
22
23
24
25
26
27Grand Total
28
29
30% of Sales
31
32
33
34
35
36
Sheet1
Cell Formulas
RangeFormula
F14=IF(A14="% of Sales","",IF(OR(A14="Grand Total",A14=""),"",HYPERLINK(INDIRECT("A14"),OFFSET(A14,0,0))))
 
Upvote 0
Your logic is incorrect

IF(A14="% of Sales", then IF(A14="Grand Total or its blank...

well it wont be neither of those as youve just specified its "% of Sales"
e.g.
IF(A1=1,IF(OR(A1=2,A1=3....

If A1 =1 it can NEVER be 2 or 3 at the same time so in your IF(A14is "% of Sales"... the IF(OR... will ALWAYS fail.

Might be better to explain in words what youre trying to achieve.
 
Last edited:
Upvote 0
Thanks for your input

The formula in words is supposed to do the following

If the text in A14 contains either "% of Sales", or "Grand Total" then a blank is to be returned, otherwise return the hyperlink in A14 (the sheet name is in A14, A15 etc)

When copying the formula down into the next cells , I added the offset function to refer to the next cell for the hyperlink for eg A15 etc


Please advise if you need further information
 
Upvote 0
That puts a different light on it.

One of these should work (untested)

=IF(OR(A14="% of Sales",A14="Grand Total"),"",HYPERLINK(A14))

or
=IF(OR(A14="% of Sales",A14="Grand Total"),"",HYPERLINK(INDIRECT("A14")))
 
Last edited:
Upvote 0
Thanks for your help. When clicking in the Hyperlink, I get a message "Cannot open the specified item"



Book1
AB
14BR1BR1
15BR2BR2
16
17
18
19
20
21
22
23
24
25
26
27Grand Total
28
29
30% of Sales
31
32
33
34
35
36
37
38
39
40
41
Sheet1
Cell Formulas
RangeFormula
B14=IF(OR(A14="% of Sales",A14="Grand Total"),"",HYPERLINK(A14))



I have also shared the file "Hyperlink formula.xlsx" , which is a sample file on Box


https://app.box.com/s/7hehkd83wpcftlzj7480jft2rmp8ezuc


Kindly test & amend formula
 
Upvote 0
Looks like you need # and the cell reference too
Try this

=IF(OR(A14="% of Sales",A14="Grand Total"),"",HYPERLINK("#"&A14&"!A1"))
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top