PDA

View Full Version : Checking if cell contains a string or a number



Djblois
11-06-2007, 08:34 AM
If Not IsNumeric(Range(Cells(2, lColNum), Cells(finalrow(wsWorking), lColNum))) Then ' It keeps crashing on this line
comProper Range(Cells(2, lColNum), Cells(finalrow(wsWorking), lColNum))
Else
Range(Cells(2, lColNum), Cells(finalrow(wsWorking), lColNum)).TextToColumns _
Destination:=Range(Cells(2, lColNum), Cells(finalrow(wsWorking), lColNum))
End If

wsworking is already defined as the current worksheet
lcolnum is defined as the current column
comproper is a procedure I have created to strings into proper format

figment
11-06-2007, 08:43 AM
what is the error message?

Norie
11-06-2007, 08:45 AM
Daniel

If it's crashing on the line indicated it could be due to what I mentioned in your other thread - unqualified references.

Djblois
11-06-2007, 08:46 AM
I will try that norie