Highight cell with non numeric data

B

Billy

I'm getting this error

compile error : invalid or unqualified reference



If !IsNumeric((Cells(Row, 11).Value)) Then
Cells(Row, 11).Interior.ColorIndex = 4
End If


I just want to validate that the data in the cell is numeric.
 
P

Paul Wilson

Billy,

Remove the ! mark, then it should work.


If IsNumeric((Cells(Row, 11).Value)) Then
Cells(Row, 11).Interior.ColorIndex = 4
End If

Paul
 
P

Paul Wilson

Sorry This should have read

If Not(IsNumeric((Cells(Row, 11).Value))) Then
Cells(Row, 11).Interior.ColorIndex = 4
End If

as you are testing for non-numeric values.
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top