A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Thanks for the response. I tried and I couldn't figure out the problem so I re-wrote the sub using .Formula, everything is working fine again:
Sub convert_textTOnumber(ws As Worksheet)
Dim colLtr As String, testCol As String
'==============================================================================
With ws
.Select
prlCol = .Cells(1, Columns.Count).End(xlToLeft).Column
prlRow = .Cells(Rows.Count, "B").End(xlUp).Row
.Cells(1, prlCol + 1) = "TEST"
testCol = findcolumn("TEST", ws, 1, True)
For Each c In .Range(Cells(1, 1), Cells(1, prlCol)).Cells
If c.Value = "Project #" Or c.Value = "Existing PO#" Or c.Value = "Purchase Request #" Or _
c.Value = " Requisition #" Or c.Value = "PO #" Or c.Value = "Line #" Or c.Value = "QTY" Then
colLtr = findcolumn(c.Value, ws, 1, True)
fillrange = .Range(testCol & "2:" & testCol & prlRow).Address
.Range(testCol & "2").Formula = "=IF(" & colLtr & "2="""","""",VALUE(" & colLtr & "2))"
.Range(testCol & "2").AutoFill .Range(fillrange), xlFillDefault
.Range(fillrange).Calculate
.Range(fillrange).Value = .Range(fillrange).Value
.Range(fillrange).Copy
.Cells(2, c.Column).PasteSpecial xlValue
End If
Next c
fltrCol = findcolumn("TEST", ws, 1, False)
Columns(fltrCol).Select
Selection.Delete Shift:=xlToLeft
.Range("B2").Select
End With
End Sub