Hi all,
I'm having trouble with the argument below....
[TABLE="width: 420"]
<tbody>[TR]
[TD]2005[/TD]
[TD]2005[/TD]
[TD]2005[/TD]
[TD]2006[/TD]
[TD]2006[/TD]
[TD]2007[/TD]
[TD]2008[/TD]
[TD]2008[/TD]
[TD]2008[/TD]
[TD]2009[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Jan[/TD]
[TD]Jun[/TD]
[TD]Jan[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]0[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I want to find out how may years hold positive counts (the count itself, nor the number of months with counts, matter). The following code works if I select the range for a single year......
=IF(COUNTA(A1:C1)>0,1,0)
.... but I have multiple spreadsheet, and there is no standard number of results per year. Ideally, I'd like to find one line of code that will do the above (give a '1' if there has been a positive result within the selected range of cells), but make it dependent on the year so that I don't have to manually select the range for each year. So far I can only think how to do this with one formula per year, so still several formulas but no need to select the range for that year (does that make sense??)
What I want it to say is: 'If row one = 2005, return 1 if cells in row 2 >1, else return 0'
I feel like this should work but it doesnt.....
=IF(1:1=2005,(COUNTA(2:2)>0,1),0)
In addition, if anyone can see how to do this in one simple formula to incorporate all years, that would be amazing!!!!
Sorry for the long winded explanation,
Thanks,
Laura
I'm having trouble with the argument below....
[TABLE="width: 420"]
<tbody>[TR]
[TD]2005[/TD]
[TD]2005[/TD]
[TD]2005[/TD]
[TD]2006[/TD]
[TD]2006[/TD]
[TD]2007[/TD]
[TD]2008[/TD]
[TD]2008[/TD]
[TD]2008[/TD]
[TD]2009[/TD]
[/TR]
[TR]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Jan[/TD]
[TD]Jun[/TD]
[TD]Jan[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Feb[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]0[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]
I want to find out how may years hold positive counts (the count itself, nor the number of months with counts, matter). The following code works if I select the range for a single year......
=IF(COUNTA(A1:C1)>0,1,0)
.... but I have multiple spreadsheet, and there is no standard number of results per year. Ideally, I'd like to find one line of code that will do the above (give a '1' if there has been a positive result within the selected range of cells), but make it dependent on the year so that I don't have to manually select the range for each year. So far I can only think how to do this with one formula per year, so still several formulas but no need to select the range for that year (does that make sense??)
What I want it to say is: 'If row one = 2005, return 1 if cells in row 2 >1, else return 0'
I feel like this should work but it doesnt.....
=IF(1:1=2005,(COUNTA(2:2)>0,1),0)
In addition, if anyone can see how to do this in one simple formula to incorporate all years, that would be amazing!!!!
Sorry for the long winded explanation,
Thanks,
Laura