Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody,
I've got an issue that I am racking my brains out but am no closer to a solution. Appreciate if anyone can help. Currently I have to import a .txt file into excel as text. Sometimes my source file contains funny characters instead of proper digits such as "²", "±", "´" which are not consistent. I'll like to be able run a macro that highlights the row that contains any characters which are not proper digits. E.g. in my column d, i get 0715±0042736 in a certain row, I want to highlight it. Got error when I tried this but cant think of a workaround: Sub Color() Dim R As Range Dim V As Variant Dim S As String S = "1,2,3,4,5,6,7,8,9,0" '<<<< This is the data to test against V = Split(S, ",") For Each R In Range("d1:d500") '<<<< This is the range with data If InStr(R, V) Then cell.EntireRow.Interior.ColorIndex = 3 Else cell.EntireRow.Interior.ColorIndex = 0 End If Next R End Sub Thanks a lot for any assistance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Special characters in a string variable | Excel Programming | |||
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. | Excel Discussion (Misc queries) | |||
String Function 'Like' and Special Characters | Excel Programming | |||
Escape for special characters in string | Excel Programming |