How to convert formula to string

kelangdu

New Member
Joined
Sep 30, 2015
Messages
16
Like the title, I want to write a cell with formula into a text string. For example, I got three values in three cells as follows:

A1 = 5
A2 = 3
A3 = 1

Then I got cell A4 with the formula: =A1*A2-A3
Now I want to make a function to convert the value in cell A4 to a text string like 5*3-1 (not the result A1*A2-A3 as the Range("A4").Formula would return).
Is there any possible way to do it?

Thanks a lot.
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
like the title, i want to write a cell with formula into a text string. For example, i got three values in three cells as follows:

A1 = 5
a2 = 3
a3 = 1

then i got cell a4 with the formula: =a1*a2-a3
now i want to make a function to convert the value in cell a4 to a text string like 5*3-1 (not the result a1*a2-a3 as the range("a4").formula would return).
Is there any possible way to do it?

Thanks a lot.

In A4,
type ="="&A1&"*"&A2&"-"&A3
 
Upvote 0
Thank you smallxyz for your quick reply.
Sorry my question is not clear. I mean to do it in VBA, whenever a user choose a cell with formula, the function will convert the formula to a text string which show a formula of real values, not reference. Is this possible?
 
Upvote 0
@small Quoting entire posts is just clutter and makes the thread difficult to read.
 
Upvote 0

Forum statistics

Threads
1,217,881
Messages
6,139,185
Members
450,184
Latest member
Welsrot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top