Hi there,
I am currently working on sorting and copying data from a very large data set into individual sheets. More specificaly, taking Meteorelogical data which is numberd with the station number, year, and date ie: 15901A1953010102. This is hourly data and am I trying to use a countif statement to find the number of hours for each year (which should be 8760 for a normal year and 8784 for a leap year). I am using a loop to go through each year of data which is available (being from 1953 to 2011). I want to then use the variable counter from my for loop as the criterion for my countit function. Using plainly [COUNTIF(A:A, "*1953*")] with the asterix's works fine however I am not sure how to slide in the variable counter. I don't have to much experience in coding but from what I think I know the problem is I am trying to use a string where I need a number? Here's my code:
I have the message box in there for now to see the output. If anybody could help me out that would be great!
cheers,
Moderator note: Added code tags.
Bookmarks