Option Explicit Sub TexttoNumber() 'Tom Ogilvy, 1999-09-14, microsoft.public.excel.worksheet.functions For Each cell In Selection If Not cell.HasFormula Then If IsNumeric(cell.Value) Then cell.NumberFormat = "General" cell.Value = cell.Value End If End If Next End Sub Sub ConvertToAbsoluteReferences() 'Bernie Deitrick, Email 1999-09-10 Dim myCell As Range For Each myCell In Selection If myCell.HasFormula Then myCell.Formula = Application.ConvertFormula(myCell.Formula, _ xlA1, xlA1, xlAbsolute) End If Next myCell End Sub Sub ConvertToNonAbsoluteReferences() 'Bernie Deitrick, Email 1999-09-10 Dim myCell As Range For Each myCell In Selection If myCell.HasFormula Then myCell.Formula = Application.ConvertFormula(myCell.Formula, _ xlA1, xlA1, xlRelative) End If Next myCell End Sub Sub TextToFormula() 'Bernie Deitrick, Email 1999-09-10 Dim myCell As Range For Each myCell In Selection myCell.Formula = myCell.Text Next myCell End Sub Sub FormulaToText() 'Bernie Deitrick, Email 1999-09-10 Dim myCell As Range For Each myCell In Selection myCell.Formula = "'" & myCell.Formula Next myCell End Sub Sub TextToFractionxxx() 'From: "Dana DeLouis" 'References: 'Subject: Re: Excel treats 1/2 as a date instead of a fraction 'Date: Sun, 23 Jan 2000 10:42:52 -0500 'http://www.deja.com/=dnc/getdoc.xp?AN=574126457 GoTo withouttest 'Testing -- usage copy column E (test data) to Column A Application.Calculation = xlCalculationManual 'in XL97 Columns("E:E").Select Selection.Copy Columns("A:A").Select ActiveSheet.Paste Range("a1:a35").Select Application.Calculation = xlCalculationAutomatic 'in XL97 'already in place for testing 'B1: =ISTEXT(A1) 'C1: =GetFormula(A1) 'D1: =GetFormat(A1) 'J1: =YEAR(E1) 'K1: =MONTH(E1) 'L1: =DAY(E1) 'Color added into coding below for testing withouttest: Dim rng As Range Dim str As String For Each rng In Selection If rng.NumberFormat = "@" Then str = rng.Value 'MsgBox Year(rng) & " -- " & rng.Value & " -- " & rng.NumberFormat If InStr(1, rng.Value, "/") Then rng.NumberFormat = "[red]# ###/###" Else rng.NumberFormat = "[red]General" End If 'If InStr(1, rng.Value, ".") Then rng.NumberFormat = "General" If Trim(rng) <> "" Then rng.Value = str Else If isdate(rng) Then rng.NumberFormat = "[green]# ###/###" If Year(rng) = 1900 Or Year(rng) = 2000 Then 'i.e. 7/8 rng.Formula = "=" & Month(rng) & "/" & Day(rng) ElseIf Year(rng) < 1900 Then 'i.e. 7/267 rng.Value = "=" & Month(rng) & "/" & Year(rng) Else 'i.e. 29/32 or 61/64 'MsgBox Year(rng) & " -- " & rng rng.Value = "=" & Month(rng) & "/" & (Year(rng) Mod 100) End If End If End If 'dim V As Variant, VI As Variant ' V = Split(rng, "/") ' rng.Formula = "=" & V(0) & "/" & V(1) ' Selection.NumberFormat = "# ###/###" Next rng End Sub Sub TextToFraction() 'David McRitchie 2000-01-24 Stock Prices back to fractions 'Excel treats 1/2 as a date instead of a fraction 'http://www.deja.com/=dnc/getdoc.xp?AN=574126457 Dim rng As Range 'r-n-g as in range For Each rng In Selection If rng.NumberFormat = "@" Then If InStr(1, rng.Value, "/") Then rng.NumberFormat = "# ###/###" Else rng.NumberFormat = "General" End If If Trim(rng.Formula) <> "" Then rng.Value = Trim(rng.Value) Else If isdate(rng) Then rng.NumberFormat = "[Color 30]# ###/###" If Year(rng) = Year(Now()) Then 'i.e. 7/8 rng.Formula = "=" & Month(rng) & "/" & Day(rng) ElseIf Year(rng) < 1900 Then 'i.e. 7/267 entered into General rng.Value = "=" & Month(rng) & "/" & Year(rng) Else 'i.e. 29/32 or 61/64 rng.Value = "=" & Month(rng) & "/" & (Year(rng) Mod 100) End If End If End If Next rng End Sub