![]() |
|
|
| Subject:
How Can I Count Characters In The Active Row Using VBA
Category: Computers > Programming Asked by: prefnet-ga List Price: $10.00 |
Posted:
29 Jun 2005 20:25 PDT
Expires: 29 Jun 2005 20:44 PDT Question ID: 538596 |
How do I count the number of instances of a text string in the active
row (i.e. the row where I have clicked on a cell) to be able to branch
to a particular VBA routine?
I tried the following code, but it doesn't work properly.
What I need the VBA code to do is: If the number of times the
character "-" appears in the current row is greater than 7, then...
HERE'S WHAT I WROTE SO FAR:
Sub ChooseForm()
If Application.CountIf(Cells(Selection.Row, "-")) > 7 Then
CodeA
Else
CodeB
End If
End Sub |
|
| There is no answer at this time. |
|
| There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
| Search Google Answers for |
| Google Home - Answers FAQ - Terms of Service - Privacy Policy |