0
Thanks

A few words of thanks would be greatly appreciated.

Excel - Display Formula in Cell




Issue

  • Cell A4, contains a formula
    =Sum(A1:B3)+A3/B2
    .
  • How to display the formula in cell A6 for this formula please ?
  • That is =Sum(A1:B3)+A3/B2
  • I know Control + ~ can view the formula in a spreadsheet.
  • But that is view only. Another control + ~ will turn back to normal.
  • I want to display the formula in cell.

Solution


Create a personalized macro function in a new module :
Function DisplayFormula(cel As Range) 
        DisplayFormula = cel.Formula & "" 
End Function



and after use this new function to the column B cells.
For example, if you want to display the A2 formula in B2, you have to write in B2 the following formula :
=DisplayFormula(A2) 

Note


Thanks to aquarelle for this tip on the forum.
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Excel - Display Formula in Cell », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!