Macro open URLs in cells

ibTops

New Member
Joined
Sep 21, 2017
Messages
12
I have a worksheet in which Cells B31 and D31, each have a CONCATENATE formula that picks up values from different cells, to construct a URL. Here's a simplified example:

B5 =
"sport"
B6 ="weather"

B31 =CONCATENATE("https://www.bbc.com/"; B5)
D31 =CONCATENATE("https://www.bbc.com/"; B6)

I need a macro that opens both of these links. Preferably in a new Chrome window, in separate tabs.

I tried adding:

B32 =B31
D32 =D31

In order to get just the value produced from the [FONT=&quot]CONCATENATE formula.

[/FONT]
Thanks for the help!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Does this work for you?
Code:
Sub WWW()
    Dim URL As String
    URL1 = Range("D31").Value
    URL2 = Range("B31").Value
    ActiveWorkbook.FollowHyperlink URL1
    ActiveWorkbook.FollowHyperlink URL2
End Sub

For reference: Link
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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