VBA or Formula for Conditional Hyperlinks

kmichael

New Member
Joined
Jan 5, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have a variety of carriers I am wanting to insert tracking links based on tracking information. See below

1672962582315.png


I am hoping to use the number entered in Column J to search the appropriate tracking site.
I have Column I with a drop down of possible options.
These are the links I am trying to use for pulling data:


Please help me make this easier for me to track.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
not sure if this will work
I'm assuming the tracking number
=HYPERLINK("https://www.fedex.com/fedextrack/system-error?trknbr=("&J2&")")
I'm assuming the tracking number is within the brackets

so you would need the links in a table to be able to then lookup and add the shipping number

Book1
HIJKLMNOPQRS
1ShipperNumberURLLOOKUP TABLE
2fedex1234https://www.fedex.com/fedextrack/system-error?trknbr=(1234)fedexhttps://www.fedex.com/fedextrack/system-error?trknbr=(
3SFLabchttps://www.sefl.com/webconnect/tracing?Type=PN&RefNum1=(abc)
4UPSabc1234https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=(abc1234)UPShttps://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=()&requester=ST/
5
6SFLhttps://www.sefl.com/webconnect/tracing?Type=PN&RefNum1=(
7
Sheet1
Cell Formulas
RangeFormula
K2:K4K2=HYPERLINK(INDEX(R2:R6,MATCH(I2,Q2:Q6,0))&J2&")")
 

Attachments

  • Screenshot 2023-01-06 at 10.07.14.png
    Screenshot 2023-01-06 at 10.07.14.png
    130.8 KB · Views: 6
Upvote 0
Yes...worked perfectly. Thank you so much.
The explanation also made it easy for me to adjust for more carriers if needed too
 
Upvote 0
Actually, This works great for each first tracking number with each carrier but isn't creating url for variations within column J that have the same selection in column K
 
Upvote 0
1673032557972.png


Currently have this formula in Column K: =HYPERLINK(INDEX(Z2:Z5,MATCH(I2,Y2:Y5,0))&J2&")")
But it is only matching to first FedEx and creating hyperlink then others appear as N/A
 
Upvote 0
Try fixing your ranges

Excel Formula:
=HYPERLINK(INDEX($Z$2:$Z$5,MATCH(I2,$Y$2:$Y$5,0))&J2&")")
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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