Welcome
Welcome to <strong>SpreadCE / Spread32</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

get text of a formula?

Post your comments, questions, bug reports and feature requests here.

get text of a formula?

Postby kdmoyers on Fri Jul 10, 2009 6:32 pm

Is there a way to make a formula that shows the text of the formula in another cell?

For example, if B4 contains =SUM(B1:B3)
then I want A4 to display, literally, "=SUM(B1:B3)"

I realize you can do this individually by pressing a series of keys, but I was hoping to do it with a formula of some sort.

(The idea is to make a column that visually documents
the formulas in the column next to it.)

Thanks!
kdmoyers
 
Posts: 4
Joined: Wed Jul 01, 2009 7:06 pm

Postby stephenbye on Fri Jul 10, 2009 8:18 pm

You can do this with a user-defined function.

1) Use the Insert > Macro sheet menu option to insert a macro sheet.

2) Enter the following functions on the macro sheet:
=ARGUMENT("reference",8)
=RETURN(GET.CELL(6,reference))

3) Use the Insert > Name > Define menu option to assign a name to the first cell of the macro, for example "getFormula".

4) Go back to your worksheet and enter your formula like
=getFormula(B4)

I will send you an example file.
stephenbye
Site Admin
 
Posts: 157
Joined: Sun Aug 12, 2007 11:56 pm

Postby kdmoyers on Mon Jul 20, 2009 2:26 pm

Extremely cool --- thanks SO MUCH!
kdmoyers
 
Posts: 4
Joined: Wed Jul 01, 2009 7:06 pm


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron