'using formulas and hyperlink in the same cell

So the main idea is I want to put a Hyperlink on a cell that contains a formula, But google sheet don't like that.

I had 2 ideas.

1- Put the formula in cell A1 and the output of that formula is dumped into cell A2 which is gonna be Hyperlinked.
(I tried to use FILTER to pull data into the Hyperlinked cell but it would give me a #REF! error:Array result was not expanded because it would overwrite data in A2.)

2- Use some sort of apps-script of which I have very little understanding of, so I didn't find any scripts relating to my question.



Solution 1:[1]

I didn't understand the reason why you can't put a Hyperlink AND a formula in the same cell, But as far as I understood:
Hyperlink is a formula it self ? =HYPERLINK(url, [link_label])

So instead of Hyperlinking our cell using the UI, we can use the formula form to Hyperlink the cell and use our formula in the place of [link_label] which is gonna be the name of our cell:
=HYPERLINK( url , [link_label])
=HYPERLINK("google.com", SUM(B2:B5 ))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 omar