|
|
|
|
|
|
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:
|
- Copy the code above.
- Open a workbook.
- Hit Alt+F11 to go to the Visual Basic Editor (VBE).
- Choose Insert-Module from the menu.
- Paste the code into the code window at right.
- Close the VBE.
|
Test the code:
|
- Select the cells that you want to change from text to a formula.
- 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.
|
|