Excel

Replicate the Functionality of the = Icon (Formula Palette)

Ease of Use

Intermediate

Version tested with

2000 

Submitted by:

byundt

Description:

Excel 2002 and 2003 do not include the = icon to the left of the formula bar. This macro restores that functionality. 

Discussion:

If you want to compare a set of complicated formulas, then enter them as text without the = sign. You can then see the required changes more easily. Run the Equals macro, and the selected cells are converted into formulas. 

Code:

instructions for use

			

Sub Equals() Dim cel As Range Application.ScreenUpdating = False For Each cel In Selection.Cells If Not IsError(Evaluate("=" & cel.Value)) And cel.HasFormula = False Then _ cel.Formula = "=" & cel.Value Next cel Application.ScreenUpdating = True End Sub

How to use:

  1. Copy the code above.
  2. Open a workbook.
  3. Hit Alt+F11 to go to the Visual Basic Editor (VBE).
  4. Choose Insert-Module from the menu.
  5. Paste the code into the code window at right.
  6. Close the VBE.
 

Test the code:

  1. Select the cells that you want to change from text to a formula.
  2. Hit Tools-Macro-Macros and double-click Equals. As long as there is no error, the text is converted into a real formula.
 

Sample File:

No Attachment 

Approved by Anne Troy


This entry has been viewed 121 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express