ca143508 Posted February 27, 2007 Posted February 27, 2007 Guys, I am looking for a peice of code that will count the number of times an instance occurs in a selected column. For example: ID|NAME|DAY|TOTAL 1|BILL|MONDAY|3 2|JOAN|MONDAY|3 3|GRANT|TUESDAY|4 The result here would be "2" if I wanted to count the number of times 3 appeared in column 3. It would be even better if I could specify a count that says something like "Count the number of lines where column 3 contains a number less than 7". Any help would be great. Cheers, Mike.
PaulIA Posted February 27, 2007 Posted February 27, 2007 ca143508 said: Guys,I am looking for a peice of code that will count the number of times an instance occurs in a selected column.For example:ID|NAME|DAY|TOTAL1|BILL|MONDAY|32|JOAN|MONDAY|33|GRANT|TUESDAY|4The result here would be "2" if I wanted to count the number of times 3 appeared in column 3. It would be even better if I could specify a count that says something like "Count the number of lines where column 3 contains a number less than 7".Any help would be great.Cheers,Mike.So what you need is a loop that loops _GUICtrlListViewGetItemCount times, using StringInStr on the results of _GUICtrlListViewGetItemText to look for the text in the desired column. About 4 lines of code. Auto3Lib: A library of over 1200 functions for AutoIt
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now