Say cell A1 is 10, cell A2 is 20, cell A3 is A1+A2, which is 30. In A4, I want to show the text "10+20". Excel functions like FORMULATEXT can only print out A1+A2. FYI, I don't like using TEXT function combined with & operator to combine the formula cause the formula might be a long one. A built-in function or VBA snippet is recommended.
-
Hi and welcome. You might get a better response if you include in your question a reason why you need to do this. As you probably know, Excel formulas can get very complicated and use many functions. What is the scope of your request? Would you expect the "display cell" to include a description of the SEQUENCE or COMBIN functions, for example? Are there limits to the complexity of the formulas you want to transcribe?– FlexYourDataCommented Jul 9, 2020 at 14:04
Add a comment
|
1 Answer
You can refer to the code below:
Sub test2222()
Range("C1") = Range("A1").Text & "+" & Range("B1").Text
End Sub
-
-1: Although this may work in your example, without explaining how and why this works, OP will not be able to utilize the answer. The next question OP will ask is: okay, how do I do this?– LPChipCommented Jul 9, 2020 at 9:46
-
-
Yes, I know what it is and how to use it, but most people don't even know VBA exists. Someone who asks a question here most likely won't know about VBA or how to use it.– LPChipCommented Jul 10, 2020 at 6:26