0

I am looking for a solution on how to automatically open an Excel hyperlink directly in incognito mode.

For example, say I have the following hyperlink in column A =HYPERLINK("https://www.amazon.com/s?k=" & H3, "AMR ALL") this will open a new tab in my default web browser (Edge) however I would need to open these types of hyperlinks directly in a private window or tab. I need to specify that there are hundreds of similar hyperlinks that I need to open (quite frequently) and it's almost impossible to copy & paste these links every time - hence why I'm looking for a solution.

I have already tried setting up a Desktop shortcut for Microsoft Edge that opens ion private (incognito) directly to the main URL i.e. =HYPERLINK("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -in private "https://www.amazon.com/s?k=") however I will need the URL to pick additional information from a different cell in Excel i.e. H3 and then open the link in incognito. Not sure how I can achieve this and I would appreciate it if anyone would be able to help me out with this.

Thanks, everyone :)

Cristina
  • 1
  • 1

2 Answers2

0

3 Solutions:

  • Right-click on the link, and then press the letter "g" on the keyboard. It's almost as fast as just clicking the link.

  • Alt+Shift + Click on Link.

  • Download a Chrome extension Copy All URLs, then simply copy all URLs from the excel sheet and then open incognito and then click on that extension and simply choose option paste.

  • Thanks, but none of these two options work for me - nothing happens when I Right-click on the link, and then press the letter "g" on the keyboard. Also, Alt+Shift + Click on Link dose absolutely nothing. Furthermore, the actual link in excel is a Hyperlink which combines information from two separate cells : =HYPERLINK("URL" & H3, "AMR ALL") – Cristina Jan 28 '22 at 07:46
  • I thought you are opening an excel file in a browser. I give third solution too, you can check. – Farrukh Ali Jan 31 '22 at 06:40
0

You could automate Excel using VBA.

You could take the URL from an active cell in an Excel sheet using ActiveCell.Value and execute the Shell command on a button.

Example:

Private Sub CommandButton1_Click()
Dim str As String
str = "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe -InPrivate -url " & ActiveCell.Value
Shell (str)
Debug.Print (str)
End Sub

Please see the Output here.

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19
  • Thank you - this is what I'm trying to achieve however my Excel doc. does not contain direct links - the actual link is a combination of two cells ; the main URL (website address - lets say Amazon.com_ and the second cell (H3) has specific words that need to be combined with the main link e.g. =HYPERLINK("https://www.amazon.com/s?k=" & H3) - also when I run in Developer Mode the code opens the Edge InPrivate which is OK - however when I try to run the code on the excel file (Alt+F8) the Macro doesn't show up although it was saved and run in VBA. I'll send a screen recording later on- thanks :) – Cristina Jan 28 '22 at 08:16
  • Not sure how to send a screenshot / video here. In column B I have the Hyperlink formula which combines the main website (Amazon) with words found in column C - I just want this hyperlink to automatically open a new tab in private. Currently it opens in Edge (normal mode not private). I must admit I have no experience with VBA :( – Cristina Jan 28 '22 at 14:43
  • You could try to fetch the cell values and then merge them according to your needs and store them in variables. After that, you could pass that variable in the Shell command that opens the Edge browser. Regarding running the code, I would suggest saving your file as Macro-Enabled Workbook and see whether it helps to fix that issue. – Deepak-MSFT Jan 31 '22 at 07:43
  • You could let me know if you want help to modify the VBA code according to your need. I could try to provide further suggestions. – Deepak-MSFT Feb 10 '22 at 07:11
  • Thank you Deepak-MSFT but I got nowhere with this. It's more complicated than I thought and unfortunately I only have basic knowledge of VBA's and I'm not sure if what I need is even possible. – Cristina Feb 11 '22 at 17:45
  • It is possible to achieve. Here is the [helpful answer](https://stackoverflow.com/a/32233083/10309381) that could help you extract the URL from the Hyperlink formula and it is also possible to take the value from the H3 cell and merge in the URL. Further, we could use a loop to repeat the same process for each URL. – Deepak-MSFT Feb 14 '22 at 09:59