Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Count rows with specific attributes in VBA
Hi all,
I need to create a function that lets me pass in a range and a value that will iterate through all the rows in the range, check a specific column in each row for a specific value, and if it exists, add 1 to a counter. I want to do this in VBA, NOT using "SUM(IF" or "COUNTIF(" etc because these have limitations that don't work for me. So something like this: Foo(A1:A200, "matchVal") Where A1:A200 is the range (really the range of ROWS) to check and "matchVal" is the value to match on in whatever the column is that I specify within the code of the Foo function. Basically, I do not know how to, while iterating through cells in a Range, access a particular column and check it for a specific value. Can someone help? Thanks, Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert rows based on specific value | Excel Worksheet Functions | |||
Count rows with specific date | Excel Discussion (Misc queries) | |||
Count number of times a specific number is displayed in a cell ran | Excel Worksheet Functions | |||
How do I move rows showing a specific field to other worksheets/. | Excel Discussion (Misc queries) | |||
How do I move rows showing a specific field to other worksheets/. | Excel Discussion (Misc queries) |