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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks