Multiple Dropdown lists in a sheet with hyperlinks

DominiX1

New Member
Joined
Jan 24, 2018
Messages
13
Hello all,

I have approx. 100 company names in the "Summary" sheet and a corresponding spread sheet for every company (These are hidden and are activated via hyperlink attached to the name of the company, i.e. by clicking "Company A" cell in "Summary" it opens "Company A" sheet etc.)

What I am trying to do is with the help of a Dropdown list next to each of the company name in "Summary" sheet to show all of the cities they are providing services in and by clicking on the city it would redirect you to the relevant file (either .pdf .xlsm or .doc) with the relevant documentation

What I had done so far was

Created a list of every city the company is servicing for every company (the list is found in the relevant companies spread sheet, the cities may be similar, the same or entirely different, therefore the list is never exactly the same for all) and hyperlinked it with the relevant document so now by clicking manually on "London" in "Company A" sheet it redirects me to the linked document and by clicking "Oxford" in "Company B" sheet it opens the corresponding file hyperlinked etc.

I want to take it a step further and with Data Validation or Combo Box create a list in the "Summary" sheet against every company name and by clicking that it would redirect you to the linked document, so I would not need to go in to the "Company A" sheet but access it from the "Summary"

So far I had found a solution with a Combo Box and this VBA assigned to the Combo Box

I have selected all of the cities "H2:H20" in "Company A" spreadsheet, defined it's name as "HyperLinks" and selected a cell in the next column "I3" and defined it as "LinkedCell"

In the Format Control I've selected the "LinkedCell" as the Cell Link and "HyperLinks" as the Input Range

Code:
Sub DropDown17_Change()
HyperLink_Index = Range("LinkedCell")
      If Range("HyperLinks").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Name <> "" Then
           Range("HyperLinks").Offset(HyperLink_Index - 1, 0).Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    End If
End Sub

So now it allows me to use the hyperlinked cells from the dropdown menu, BUT!

How would I be able to repeat this for the other 100 companies without creating a macro for every command button or ultimately don't make 100 command buttons?

I have most likely overcomplicated a simple task, therefore I am asking for your advice.

I've tried to be as detailed as possible, I am really hoping for some help on this.

Let me know if anything I've explained is not clear

Many thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,944
Messages
6,175,553
Members
452,652
Latest member
eduedu

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