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)


Contents of K12:
(This is normal and expected)


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



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:
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

RicoS

New Member
Joined
May 1, 2019
Messages
18
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
 

Watch MrExcel Video

Forum statistics

Threads
1,101,956
Messages
5,483,873
Members
407,418
Latest member
VaugHeat

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top