|
-
Sep 10th, 2013, 08:23 AM
#3
Junior Member
Re: (VBA) Color row if cell contains a number
Hi Bryce
Ohh That's a great MAcro and almost what I need Hope you could help?
Would it be possible to ad something to this?
I would like to ad the folowing as now when Collum K has a value then the row turns green.
In adition to this I need rows to be turned Blue when the row in collum K and M both contain a numeric value.
Could you help me with this?
Sub colorRow()
Dim i As Long
Dim j As Long
Dim LR As Long
Dim charCount As Integer
LR = Range("k" & Rows.Count).End(xlUp).Row
For i = 1 To LR
charCount = Len(Range("k" & i).Value)
For j = 1 To charCount
If IsNumeric(Mid(Range("k" & i).Value, j, 1)) Then
Range("k" & i).EntireRow.Interior.Color = vbGreen
GoTo BailOut
End If
Next j
BailOut:
Next i
End Sub
Kind regards,
Arne
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|