# Excel with tracking numbers - tie to specific URL

AD can have four different conditions: 8, 12, 14 digit numbers or combination that starts with a letter

If AD = 8 digit then AR = 3w.deliveryservice1.com
If AD = (Letter)xxxx then AR = 3w.deliveryservice2.com
If AD = 12 digit (starts with a six) then AR = Hyperlink(concatenate(AS & AD & AT))
Id AD = 14 digit (starts with a five) then AR = Hyperlink(concatenate(AU & AS & AD & AT))  'AU = zero (0)

AS = first part of delivery service URL
AT = last part of delivery service URL

Thanks in advance for any assistance
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Try this formula and let me know how it goes.

And drag it down

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Data AnalystCommented:
``````=IF(LEN(AD1)=8,"3w.deliveryservice1.com",IF(LEFT(AD1,1)="5",HYPERLINK(CONCATENATE(AU1,AS1,AD1,AT1)),IF(LEFT(AD1,1)="6",HYPERLINK(CONCATENATE(AS1,AD1,AT1)),"3w.deliveryservice2.com")))]
``````

Copy down to remaining rows.
Author Commented:
Thank You!! works as expected.
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.