F
Frustrated IT Tech
Could someone please help me with this problem. I am using excel to sift
through thousands of protein and amino acid codes abbreviated by letters.
These codes are chains up to 100 characters long, so it is difficult to read
them all by hand.
what i want to do it is change the color of S everytime it is immediately
followed by a # sign. I wrote a macro that will find all of these, but i
can't figure out how to highlight this specific character. I understand how
to highlight the whole cell, the first letter, or any number of letters, but
not how to highlight the letter I actually searched.
Here is the code I made:
Sub Color_Part_of_Cell()
Dim rCell As Range
For Each rCell In Selection
If InStr(1, rCell, "S#") <> 0 Then
rCell.Characters(1, 1).Font.Color = vbBlue
End If
Next rCell
End Sub
-----------------
An example of what i want it R#TSFDGDFT#SEGSHU#HS#GYUGUYG.
I would want only the S with the # after it to turn red, and I would have a
whole column of these sequences, (many are much larger)
Thank you in advance,
Chris
through thousands of protein and amino acid codes abbreviated by letters.
These codes are chains up to 100 characters long, so it is difficult to read
them all by hand.
what i want to do it is change the color of S everytime it is immediately
followed by a # sign. I wrote a macro that will find all of these, but i
can't figure out how to highlight this specific character. I understand how
to highlight the whole cell, the first letter, or any number of letters, but
not how to highlight the letter I actually searched.
Here is the code I made:
Sub Color_Part_of_Cell()
Dim rCell As Range
For Each rCell In Selection
If InStr(1, rCell, "S#") <> 0 Then
rCell.Characters(1, 1).Font.Color = vbBlue
End If
Next rCell
End Sub
-----------------
An example of what i want it R#TSFDGDFT#SEGSHU#HS#GYUGUYG.
I would want only the S with the # after it to turn red, and I would have a
whole column of these sequences, (many are much larger)
Thank you in advance,
Chris