FracinDean
Board Regular
- Joined
- Jul 11, 2011
- Messages
- 110
- Office Version
- 365
- Platform
- Windows
Dear Mr Excel members,
After searching this forum and looking at many examples, I'm still struggling to figure out how to use path or file or worksheet names that have blanks in them when using the Excel Hyperlink function.
The following code is working when none of the ranges named "myPath", "myFile", and "mySheet" have blanks in their values, but a blank in any of them causes errors. I have tried various combinations of single quotes around "mySheet", and multiple consecutive double quotes before myPath and after myFile but so far have not been able to get the right combination to make it work when there are blank spaces in the range values.
Can you show me how to generalize this function call to accommodate blank spaces in the path, file, or sheet names?
After searching this forum and looking at many examples, I'm still struggling to figure out how to use path or file or worksheet names that have blanks in them when using the Excel Hyperlink function.
The following code is working when none of the ranges named "myPath", "myFile", and "mySheet" have blanks in their values, but a blank in any of them causes errors. I have tried various combinations of single quotes around "mySheet", and multiple consecutive double quotes before myPath and after myFile but so far have not been able to get the right combination to make it work when there are blank spaces in the range values.
Code:
=HYPERLINK(myPath&"\"&myFile&"\"&mySheet&"!"&myTarget","Display Name")
Can you show me how to generalize this function call to accommodate blank spaces in the path, file, or sheet names?