case sensitive

  • Thread starter Thread starter ksnapp
  • Start date Start date
K

ksnapp

Hi,

Is there a way to make this not case sensitive. It looks in cells fo
a spefied string and then inserts a value or string in a differen
column

Sub b_finder() ' deltes rows with reserve in column 3
Const cColumn = 8
Dim I As Long, lngLastRow As Long
With ActiveSheet
lngLastRow = .Cells(Rows.Count, cColumn).End(xlUp).Row
For I = lngLastRow To 1 Step -1

cSearch = "B"
If InStr(1, .Cells(I, cColumn).Value, cSearch) > 0 Then
Cells(I, cColumn - 7).Value = "b"
End If
Next
End With
end su
 
Hi
change the line
If InStr(1, .Cells(I, cColumn).Value, cSearch) > 0 Then

to
If InStr(1, UCase(.Cells(I, cColumn).Value), cSearch) > 0 Then
 

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

Similar Threads

added functionality 3
Need Help with Next thing 9
Code won't fill to last row in table 4
Cell not selecting 8
Code falling over 3
Fill Array from a Range 2
Expert eye needed 4
Summary in the last row 5

Back
Top