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!
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Exceladd1ct

Board Regular
Joined
Feb 10, 2019
Messages
64
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:

Watch MrExcel Video

Forum statistics

Threads
1,127,387
Messages
5,624,402
Members
416,026
Latest member
melvic69

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
Top