Hyperlink variable on cell having text?

Kiloelectronvolt

Board Regular
Joined
Oct 5, 2015
Messages
81
Office Version
  1. 365
Platform
  1. Windows
Hi Guys, I'm a novice so I'm trying to avoid using VBA. I currently have this hyperlink working well, but I was wondering if I could add one more line to it.

=HYPERLINK("path...\Job PO's 2021\PO "&A3263&"-signed.pdf",WORKDAY(J3263,5,))

IF L3263 is blank, use below path,

path...\Job PO's 2021\PO "&A3263&"-signed.pdf

BUT if L3263 has text, use:

path...\Job PO's 2021\PO "&A3263&".pdf

TIA
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I figured it out, may not be the best way but it worked.

=IF(L3264<>"",HYPERLINK("path...\Job PO's 2021\PO "&A3264&"-signed.pdf",WORKDAY(J3264,5,)),HYPERLINK("path...\Job PO's 2021\PO "&A3264&".pdf",WORKDAY(J3264,5,)))
 
Upvote 0
Your solution is perfectly fine and thanks for sharing your solution.

One suggestion maybe: HYPERLINK function's link location parameter is a string, and you need to add the "-signed" suffix in a certain condition. So, instead of using two HYPERLINK functions, you can use the IF function when you create the link location string which will make your function shorter.

Excel Formula:
=HYPERLINK("path...\Job PO's 2021\PO " & A3263 & IF(L3264<>"","-signed","") & ".pdf",WORKDAY(J3263,5,))
 
Upvote 0
Solution
Your solution is perfectly fine and thanks for sharing your solution.

One suggestion maybe: HYPERLINK function's link location parameter is a string, and you need to add the "-signed" suffix in a certain condition. So, instead of using two HYPERLINK functions, you can use the IF function when you create the link location string which will make your function shorter.

Excel Formula:
=HYPERLINK("path...\Job PO's 2021\PO " & A3263 & IF(L3264<>"","-signed","") & ".pdf",WORKDAY(J3263,5,))
Much cleaner! I figured there was a better formula available, but I wasn't going to figure that one out. Thank you!
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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