worksheet functions

  • Thread starter Thread starter Gmet
  • Start date Start date
G

Gmet

I am trying to run a worksheet function.
MyPik="Bob"
MyNameCount = Application.WorksheetFunction = "=countif
(A2:A100,MyPik)"
I get an error. If I use the literal "Bob" I get an
error.

What have done wrong?

Gmet
 
Hi
try:
MyNameCount =
Application.WorksheetFunction.countif(range("A2:A100"),MyPik)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top