' Thomas D. Fletcher ' University of Missouri - St. Louis ' fletchert@umsl.edu ' Overtime, the origins of some of these macros have become lost ' In general, I created or manipulated code to suit my needs ' Apologies to any orignal authors ' An excelent source (where some code may have been borrowed) is [ www.j-walk.com ] '!# This file contains the syntax for several Excel macros '!# You would need to create a macro with the usual means and then '!# replace the code with each individual sub-routine '!# See relevant video for creating and importing macros in Excel ' Highlight High ' useful in highlighting values above a certain absolute value such as t, z or D^2 Sub highlightAbs() If TypeName(Selection) <> "Range" Then Exit Sub Message = "Highlight values greater than or equal to |abs| ..." Target = InputBox(Message) Target = Val(Target) For Each Item In Selection If IsNumeric(Item) Then If Item.Value >= Abs(Target) Then With Item.Interior .ColorIndex = 6 .Pattern = xlSolid End With End If End If Next Item End Sub ' convert numeric to alpha grades ' useful in changing grades expressed as percentages into letter grades ' WARNING: Be sure to have an empty column to the right of the numeric grades *** Sub ConvertGrades() For Each Item In Selection If Item.Value >= 92.5 Then Item.Offset(0, 1) = "A" ElseIf Item.Value >= 89.5 Then Item.Offset(0, 1) = "A-" ElseIf Item.Value >= 86.5 Then Item.Offset(0, 1) = "B+" ElseIf Item.Value >= 82.5 Then Item.Offset(0, 1) = "B" ElseIf Item.Value >= 79.5 Then Item.Offset(0, 1) = "B-" ElseIf Item.Value >= 76.5 Then Item.Offset(0, 1) = "C+" ElseIf Item.Value >= 72.5 Then Item.Offset(0, 1) = "C" ElseIf Item.Value >= 69.5 Then Item.Offset(0, 1) = "C-" ElseIf Item.Value >= 66.5 Then Item.Offset(0, 1) = "D+" ElseIf Item.Value >= 62.5 Then Item.Offset(0, 1) = "D" ElseIf Item.Value >= 59.5 Then Item.Offset(0, 1) = "D-" Else: Item.Offset(0, 1) = "F" End If Next Item End Sub ' copy paste values ' useful in copying functions and then pasting over the functions the actual values ' Best done with record method