Cant figure out how to count till you reach a value then stop. Count till you reach 4166 on the list below....
0
0
0
0
0
0
120
3360
4590
3450
4440
4500
3150
3670
4050
3870
4290
4260
3750
Cant figure out how to count till you reach a value then stop. Count till you reach 4166 on the list below....
0
0
0
0
0
0
120
3360
4590
3450
4440
4500
3150
3670
4050
3870
4290
4260
3750
Im sorry but Im not sure what you mean? Firstly there is no 4166 in the list, secondly do you mean count the number of rows, sum the values etc? what do you expect as the answer from your example?
If someone has helped you then please add to their Reputation
in B1
enter the value you want to stop at (ie the last counted value).
in B2
=COUNT(INDIRECT("A1:A"&MATCH(B1,A$1:A$19,0)))
Regards
Special-K
Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.
I wish people would check their test data before they post![]()
If Column A contains values (not text)
=IFERROR(MATCH(4166,A1:A100,0),0)
Quang PT
Perhaps this...
=COUNTIF(A1:A19,"<=4166")
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
It still works, it counts everything under 4166. That was my take on the question, we will have to see what the OP really wants![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks