Trevor G
Well-known Member
- Joined
- Jul 17, 2008
- Messages
- 6,842
- Office Version
- 365
- Platform
- Windows
I am struggling with using the Offset xlRight to place some text in the next empty column.
Basically I am trying to go through a range of data and if a cell is coloured green I would like to place in some text like Found at the end of the activecell cell row + 1 cell to the right. I am using a userform with a combo box and in the Change event I have a case statement to colour cells if it meets a value of either 3 or 4. But my end result is to have the word Found to filter on then copy the filter to a Found Result sheet
Here is a copy of the Code I am using
Basically I am trying to go through a range of data and if a cell is coloured green I would like to place in some text like Found at the end of the activecell cell row + 1 cell to the right. I am using a userform with a combo box and in the Change event I have a case statement to colour cells if it meets a value of either 3 or 4. But my end result is to have the word Found to filter on then copy the filter to a Found Result sheet
Here is a copy of the Code I am using
Private Sub cbo1_Change()
Select Case Me.cbo1.Value
Case "Communication & Influencing Skills"
Range("E6").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 3 Or ActiveCell.Value = 4 Then
ActiveCell.Interior.Color = vbGreen
End If
ActiveCell.Offset(1, 0).Select
Loop
Case "Delivery Focus"
Range("F6").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 3 Or ActiveCell.Value = 4 Then
ActiveCell.Interior.Color = vbGreen
End If
ActiveCell.Offset(1, 0).Select
Loop
Case "Business Diagnosis"
Range("G6").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 3 Or ActiveCell.Value = 4 Then
ActiveCell.Interior.Color = vbGreen
End If
ActiveCell.Offset(1, 0).Select
Loop
Case "Commercial Focus"
Range("H6").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 3 Or ActiveCell.Value = 4 Then
ActiveCell.Interior.Color = vbGreen
End If
ActiveCell.Offset(1, 0).Select
Loop
Case "Collaboration"
Range("I6").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 3 Or ActiveCell.Value = 4 Then
ActiveCell.Interior.Color = vbGreen
End If
ActiveCell.Offset(1, 0).Select
Loop
Case "Personal Leadership"
Range("J6").Select
Do Until ActiveCell.Value = ""
If ActiveCell.Value = 3 Or ActiveCell.Value = 4 Then
ActiveCell.Interior.Color = vbGreen
End If
ActiveCell.Offset(1, 0).Select
Loop
End Select
End Sub