Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 38
Default Formular of one cell as text shown in another cell

Suppose Cell B3 has a formular =Start!C3.
I would want Cell D3 to have the text '=Start!C3 entered.
It can be in formular or in VBA code.
Thank you


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Formular of one cell as text shown in another cell

' =======================================
Function ShowFormula(a As Range)
' Niek Otten
' March 31, 2006

If Application.ReferenceStyle = xlR1C1 _
Then ShowFormula = a.FormulaR1C1Local _
Else: ShowFormula = a.FormulaLocal
End Function
' =======================================

================================================
Pasting a User Defined Function (UDF)
Niek Otten, March 31, 2006

If you find a VBA function on the Internet or somebody mails you one, and you don't know how to implement it, follow these
steps:

Select all the text of the function.
CTRL+C (that is, press and hold down the CTRL key, press C, release both). This a shortcut for Copy.
Go to Excel. Press ALT+F11 (same method: press and hold the ALT key, press the F11 key and release both). You are now in the
Visual Basic Editor (VBE).
From the menu bar, choose InsertModule. There should now be a blank module sheet in front of you. Click in it and then
press CTRL+V (same method.). This a shortcut for Paste. You should now see the text of the function in the Module.
Press ALT+F11 again to return to your Excel worksheet.
You should now be able to use the function as if it were a built-in function of Excel, like =SUM(..)
================================================



--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"dan" wrote in message news:6VqGg.5598$6s.5296@trndny08...
| Suppose Cell B3 has a formular =Start!C3.
| I would want Cell D3 to have the text '=Start!C3 entered.
| It can be in formular or in VBA code.
| Thank you
|
|


  #3   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 38
Default Formular of one cell as text shown in another cell

This is great!
Thank you very much, Niek

"Niek Otten" wrote in message
...
' =======================================
Function ShowFormula(a As Range)
' Niek Otten
' March 31, 2006

If Application.ReferenceStyle = xlR1C1 _
Then ShowFormula = a.FormulaR1C1Local _
Else: ShowFormula = a.FormulaLocal
End Function
' =======================================

================================================
Pasting a User Defined Function (UDF)
Niek Otten, March 31, 2006

If you find a VBA function on the Internet or somebody mails you one,
and you don't know how to implement it, follow these
steps:

Select all the text of the function.
CTRL+C (that is, press and hold down the CTRL key, press C, release
both). This a shortcut for Copy.
Go to Excel. Press ALT+F11 (same method: press and hold the ALT key,
press the F11 key and release both). You are now in the
Visual Basic Editor (VBE).
From the menu bar, choose InsertModule. There should now be a blank
module sheet in front of you. Click in it and then
press CTRL+V (same method.). This a shortcut for Paste. You should now see
the text of the function in the Module.
Press ALT+F11 again to return to your Excel worksheet.
You should now be able to use the function as if it were a built-in
function of Excel, like =SUM(..)
================================================



--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"dan" wrote in message
news:6VqGg.5598$6s.5296@trndny08...
| Suppose Cell B3 has a formular =Start!C3.
| I would want Cell D3 to have the text '=Start!C3 entered.
| It can be in formular or in VBA code.
| Thank you
|
|




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I paste text data into ONE cell only? Pegcorp Excel Discussion (Misc queries) 1 May 10th 06 05:48 PM
How can I make an excel cell equal to the value of a frame object text box directionalman Excel Worksheet Functions 1 February 27th 06 09:24 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
HOW TO KEEP TEXT FROM MOVING OUT OF A CELL? Briguyy Excel Discussion (Misc queries) 2 February 23rd 06 09:04 PM
Text shown up in other cells everytime a text is entered in 1 cell bioyyy Excel Discussion (Misc queries) 1 August 26th 05 05:26 PM


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"