Forum

Notifications
Clear all

Hyperlink Function that works for Windows and Macs

5 Posts
2 Users
0 Reactions
152 Views
(@larry-briggiibm-com)
Posts: 3
Active Member
Topic starter
 

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.

 
Posted : 24/12/2020 11:56 am
(@catalinb)
Posts: 1937
Member Admin
 

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.

 
Posted : 29/12/2020 2:18 am
(@larry-briggiibm-com)
Posts: 3
Active Member
Topic starter
 

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.

 
Posted : 29/12/2020 10:30 am
(@catalinb)
Posts: 1937
Member Admin
 

Can you use the formula:

=CELL("filename",A1) in both Mac and Windows?

Please provide the results of this function from both OS.

 
Posted : 29/12/2020 11:10 am
(@larry-briggiibm-com)
Posts: 3
Active Member
Topic starter
 

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.

 
Posted : 29/12/2020 11:47 am
Share: