PDA

View Full Version : Target Value



kimbap
11-30-2012, 09:16 AM
Hi Guys,

Need assistance.

I need help with my current project.

Details:

1.) There is a button assigned to a macro.
2.) When the button is clicked, message box "Great" will appear once there is a word "Good" in any cell in Columns("A:A")
3.) Else, message box "Bad" will appear.

Thanks!

Simon Lloyd
11-30-2012, 03:05 PM
So what's your issue? if you mean thst you dont have the macro already thenSub Good_Bad()
If Application.WorksheetFunction.CountIf(Range("A:A"), LCase("good")) > 0 Then
MsgBox "Great!"
Else
MsgBox "Bad!"
End If
End Sub