Please pardon my English. I try to explain my needs in excel.
I am trying to write an excel VBA code for total number counts in a particular column. for example A:A columns are filled with specified numbers. 150,200,150,175,150,150.... with B column I have a code that counts how many 150's and 200's with a code of "COUNTIFS". its an easy code. (=COUNTIFS(A:A,B2))
Now I need every fifty numbers of 150's I should get number 1 in a particular cell ( for example, C2) then another fifty numbers of 150 (that means hundred 150's) I should get number 2 in a same C2 cell. this will continue..
A reset button needed to reset this C2 value, again it should count every fifty number of 150's after reset start from beginning.
A data entry in a A column is a particular Sweet box number to particular shop. once I get a fifty sweet boxes delivered as per data, I should count 1. then another fifty sweet boxes it should count 2. once I demand a payment, I should reset the counts (not entire counts.). then again it start counting from one.
I think I explain my needs, and I hope you all are understand.
please help with VBA code.
Here is the code:
Write this code in the new module and call the function in the excel cell (Ex: C2).