GetFormula Macro

Location: http://www.mvps.org/dmcritchie/excel/getformula.htm      
Home page: http://www.mvps.org/dmcritchie/excel/excel.htm
[View without Frames]

GetFormula was my first User Define Function

I wrote GetFormula in 1997, to show the formula of another cell.  GetFormula was written as a result of my first contact with an Excel newsgroup.  Most of the help came from Alan Beban, who offered me a more complicated subroutine with offset.  I managed to simplify it to a one line formula by trial and error to exactly what I really wanted in a more generic formula. 

Having no manuals, I picked up all of the information from HELP.  My introduction to macros was from Stephen Bullen, "you need a macro", so I looked in help to find out about macros in Excel, and what they looked like.  Macros were a bit more intuitive in Excel 95 as you could see the macro on a macro sheet, so you knew exactly where to locate macros, user defined functions, and the HELP was in one place.  With Excel 97 the Visual Basic Editor was accessed separately and had it's own help file.

The first reference of a working completed GetFormula was on Oct. 7, 1997, but I had called it ShowFormula earlier on Sept 14, 1997.  ShowFormula is now used to show only a formula, when one exists.

The Code for GetFormula

Please refer to my Formula page "Show FORMULA of another cell in Excel" for GetFormula coding and variations, with examples, and more information.  (code only)
Function GetFormula(Cell)
   GetFormula = Cell.Formula
End Function

Variations of GetFormula, also written by David McRitchie

[GetFormula] [GetFormula Example]  [GetFormat] [GetText] [Ex]  [Debug Format (notes)  [HasFormula] [Ex]  [BoldSum] [FontInfo] [FontStyle] [Select cells with formulas or constants]  [UseFormula]   [Formula in MsgBox]  [Status Bar (description) moved]  [GetFormulaInfo

Related Functions by David McRitchie appearing on the Formula page


This page was introduced on January 11, 2003. 

[My Excel Pages -- home]    [INDEX to my site and the off-site pages I reference] 
[Site Search -- Excel]     [Go Back]    [Return to TOP

Please send your comments concerning this web page to: David McRitchie send email comments


Copyright © 1997 - 2004,  F. David McRitchie,  All Rights Reserved