I have a spreadsheet listing messages and when they exist, the path to their attachment files. These files exist in a sub-directory to the Excel file. I am able to create a formula to "open" the attachments in the Windows environment. So users can just click on the displayed hyperlink and the PDF file opens.
The challenge is that some of my users have Mac laptops and the function fails.
Any thoughts on writing a single formula that will open files in both the Windows and Mac operating systems?
Thanks, and Happy Holidays.
Hi Larry,
What formula are you using?
I've seen errors reported on High Sierra OS, so HYPERLINK function might fail on that system.
Path structure might be different in Mac's, older versions needs to have colon as separator.
Catalin - Thanks for reaching out.
The formula is the simplest: =Hyperlink(B2,"Click")
The value in B2 is "Subfolder1subfolder2subfolder3filename.jpg".
The Excel file is in a project directory and the target files are in subdirectories within the project directory.
This works great in the Windows world. But the pathing doesn't work in the Mac world.
There are two challenges as I see it:
- first, identify which OS is being used
- second, modify the path to work in the Mac OS
I assume someone has had to make the Hyperlink function work in both environments before. Just not something I have been able to solve.
Thanks.
Can you use the formula:
=CELL("filename",A1) in both Mac and Windows?
Please provide the results of this function from both OS.
Ah, very cool. Thanks
Windows: C:UsersLarrySlack Test[Correct_Attachment_Path.xlsx]XXX
Mac: /Users/mhenry/Desktop/[cell_test.xlsx]Sheet1
I can work with this to identify the variations in the folder separator char and then modify the attachment file path.
Thanks! I'll give it a try and post the results.