Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The position of the cells which have the data I want to check, change
depending on certain criteria. Is it possible in VBA to create a flexible COUNTIF statement, where the range is a range object or something similar? What is the sintax? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range, cnt as Long
With Worksheets("sheet1") set rng = .Range(.cells(5,1),.cells(5,1).End(xldown)) End With cnt = Application.countif(rng,"AA") -- Regards, Tom Ogilvy "Sabean" wrote: The position of the cells which have the data I want to check, change depending on certain criteria. Is it possible in VBA to create a flexible COUNTIF statement, where the range is a range object or something similar? What is the sintax? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using =COUNTIF() in a variable range on a different worksheet? | Excel Worksheet Functions | |||
Using COUNTIF for multiple text data creating a logic statment | Excel Worksheet Functions | |||
Using variable sized range in CountIf() | Excel Discussion (Misc queries) | |||
variable range countif | Excel Worksheet Functions | |||
setting a range variable equal to the value of a string variable | Excel Programming |