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

How to get a return value from a user defined function 1
Menu Options 2
VBA userform Vlookup Excel 1
CountIfs 5
Networkdays 2
Userform Refresh on Worksheet change 3
Worksheet Function countif 3
VLookUp Function 3

Back
Top