How does one cell obtain the formula of another cell as text without using VBA? I can see this question has already been asked many times and the answer is always to write a custom function in VBA.
However, I found a post made in 2006 which claimed to have found the non-VBA solution but the link provided in that post is already broken.
Going to Formulas -> Define Name, I defined two named ranges (see fig. 2), with the information shown in cells A6:B8. Enter in cell B2 =FormulaAsText . This will retrieve the formula in cell A2 as text.
Click Home > Cut (or press Ctrl + X). Select the cell you want the formula to be in, and then click Paste (or press Ctrl + V). Verify that the cell references are still what you want. Tip: You can also right-click the cells to cut and paste the formula.
If cell contains specific text, then return a value Select the output cell, and use the following formula: =IF(cell="text", value_to_return, ""). For our example, the cell we want to check is A2, the text we're looking for is “example”, and the return value will be Yes.
=FormulaText(Reference)
will do the trick Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With