ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheet functions (https://www.excelbanter.com/excel-programming/308916-worksheet-functions.html)

Gmet[_2_]

worksheet functions
 
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

Frank Kabel

worksheet functions
 
Hi
try:
MyNameCount =
Application.WorksheetFunction.countif(range("A2:A1 00"),MyPik)


--
Regards
Frank Kabel
Frankfurt, Germany


Gmet wrote:
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




All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com