Google Answers Logo
View Question
 
Q: How Can I Count Characters In The Active Row Using VBA ( No Answer,   0 Comments )
Question  
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
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

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 Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy