Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am recording a macro in Excel 2003 (do not know or use VBA Editor) that
involves many different tasks in the worksheet. When I run the macro, it runs everything except the CountIF function I recorded. I am using the function to capture the number of times certain text appears in a column. Any assistance on getting the macro to record the function? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you want the formula inserted
Activecell.Formula = "=COUNTIF(A1,A20,""some value"")" or get the result Msgbox Application.Countif(Range("A1:A20"),"some value") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Melissa" wrote in message ... I am recording a macro in Excel 2003 (do not know or use VBA Editor) that involves many different tasks in the worksheet. When I run the macro, it runs everything except the CountIF function I recorded. I am using the function to capture the number of times certain text appears in a column. Any assistance on getting the macro to record the function? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
n = Application.CountIf(Range("A:A"), Range("B1"))
In VBA COUNTIF() needs to be spoon-fed the range. -- Gary's Student "Melissa" wrote: I am recording a macro in Excel 2003 (do not know or use VBA Editor) that involves many different tasks in the worksheet. When I run the macro, it runs everything except the CountIF function I recorded. I am using the function to capture the number of times certain text appears in a column. Any assistance on getting the macro to record the function? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|