Weird bug in PowerQuery hyperlink generation?

ks_12345

New Member
Joined
Jun 25, 2019
Messages
1
I have a sheet that generates hyperlinks automatically based on other cell values using a custom column. It has been working fine until now, but I just started seeing some weird bugs in it.

My custom column fomula is as follows:

Code:
"'=HYPERLINK(""" & "URL<url>/files/J01009/" & [Account_Number] & "/" & [Photo_account_verification] & """,""" & [Photo_account_verification] & """)"

I'm adding an apostrophe to the beginning of the hyperlink, the reason is explained below:
- Without the apostrophe, the column directly returns the formula in the format: =HYPERLINK("URL","FriendlyName")
- But this is not a clickable link when it is generated by PowerQuery
- To workaround this, I am making the PowerQuery return the hyperlink with an apostrophe in the beginning, and then running a macro to replace '= with =
- After running the macro, the cells return clickable links.

This has been working great till now.

But now, please see the following returned by Powerquery:

Contents of K11:
(There's a problem in this, as there are two apostrophes in the beginning instead of one)
Screenshot-47.png


Contents of K12:
(This is normal and expected)
Screenshot-48.png


Please see the difference between what is the contents of K11 in the formula bar vs what is shown in the sheet.
Screenshot-46.png



Due to this, once I run the Find_Replace macro, K12 gives me a clickable hyperlink but K11 does not!
I'm beating my head over this, please someone help? </url>:confused:
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Just remove the quote from the hyperlink in the power query formula and it will return the correct hyperlink formula as text. Then in VBA, just use:

Range("yourQueryTableName[Photo - Account Verification...]").Formula =
Range("yourQueryTableName[Photo - Account Verification...]").Formula

This will change to formula in text to the actual formula value
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

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