Sub MacForHglover() ' ' Mac_Gtg_hglover Macro ' Macro recorded 23-DEC-06 by David Marks ' ' Cycle through all cells ' Reset value of numeric cells to zero ' Keep formulas and text intact Dim StartCol As Integer Dim StartRow As Integer Dim EndCol As Integer Dim EndRow As Integer Dim CurrCol As Integer Dim CurrRow As Integer Dim myCellRng As Range Dim myCellType As String 'Set range to update StartCol = 0 'will start checking at 0+1 i.e. first column or column A StartRow = 1 'will start checking at 1+1 i.e. skip header and check from 2nd row EndCol = ActiveSheet.UsedRange.Columns.Count EndRow = ActiveSheet.UsedRange.Rows.Count CurrCol = StartCol CurrRow = StartRow 'Debug.Print 'Debug.Print "Workbook = ", ActiveWorkbook.Name 'Debug.Print "SheetName = ", ActiveSheet.Name 'Debug.Print 'Cycle through each column Do Until CurrCol = EndCol CurrCol = CurrCol + 1 ' Debug.Print ' Debug.Print ' Debug.Print "CurrCol", "CurrRow", "myCellVal", "HasFormula", "Formula", "IsNull", "IsNumeric", "IsZeroLen", "myCellType" 'Cycle through each row Do Until CurrRow = EndRow CurrRow = CurrRow + 1 Set myCellRng = Cells(CurrRow, CurrCol).Range("a1") 'Check cell contents If myCellRng.Value = "" Then 'Cell is EMPTY 'do nothing myCellType = "EMPTY" ElseIf myCellRng.HasFormula = True Then 'Cell has a FORMULA 'do nothing myCellType = "FORMULA" ElseIf IsNumeric(myCellRng) = False Then 'Cell contains TEXT 'do nothing myCellType = "TEXT" ElseIf IsNumeric(myCellRng) = True Then 'Cell contains a NUMBER 'Replace number with 0 myCellRng.Value = 0 myCellType = "NUMBER" Else 'Cell contains something I had not considered 'The debug print below will help identify any logic errors in my if statement myCellType = "????????" End If ' Debug.Print _ ' CurrCol, _ ' CurrRow, _ ' myCellRng.Value, _ ' myCellRng.HasFormula, _ ' myCellRng.Formula, _ ' IIf(IsNull(myCellRng), "True", "False"), _ ' IsNumeric(myCellRng), _ ' IIf(myCellRng.Value = "", "True", "False"), _ ' myCellType Loop CurrRow = StartRow Loop dummy = MsgBox("Finished", vbOKOnly) End Sub