1). How to open VBA-redactor - place my code instead of "sub Hello()" they are writing on 2-nd page. 2). Then you will be allowed to use this function in your Excel-file. If you want to use it in any file you want - find how to open a PERSONAL.XLSB and place code there. 3). Function has 2 arguments: first is a name that code will search among some area and the second one is that area. For example:
Код
=RioCounter(A7;$C$2:$K$25)
Where A7 contains "BMW" value and $C$2:$K$25 (or C2:K25 if you don't need to prolong formula) is a range where to search.
[p.s.]Rioran, kindda like running river, six letters =) There is no place for character "d" =)[/p.s.]
İstak, here what you need:
1). How to open VBA-redactor - place my code instead of "sub Hello()" they are writing on 2-nd page. 2). Then you will be allowed to use this function in your Excel-file. If you want to use it in any file you want - find how to open a PERSONAL.XLSB and place code there. 3). Function has 2 arguments: first is a name that code will search among some area and the second one is that area. For example:
Код
=RioCounter(A7;$C$2:$K$25)
Where A7 contains "BMW" value and $C$2:$K$25 (or C2:K25 if you don't need to prolong formula) is a range where to search.
[p.s.]Rioran, kindda like running river, six letters =) There is no place for character "d" =)[/p.s.]Rioran
Роман, Москва, voronov_rv@mail.ru Яндекс-Деньги: 41001312674279
İstak, allright then, but I think such formula is beyond possibilities of standart Excel functionality. And even if it can be written by mortal man - it will be great amount of symbols, requiring too much PC resources. So why do you need formula when in this case UDF is an optimal option (as it seems to me)?
İstak, allright then, but I think such formula is beyond possibilities of standart Excel functionality. And even if it can be written by mortal man - it will be great amount of symbols, requiring too much PC resources. So why do you need formula when in this case UDF is an optimal option (as it seems to me)?Rioran
Роман, Москва, voronov_rv@mail.ru Яндекс-Деньги: 41001312674279
If you want formula so bad then you might be interested by my next idea. In attached file you will find solution with constructing one more table the same size as original. Only one formula for constructing such table is needed:
Код
=ЕСЛИ(C2="";M1;C2)
Where C2 is top left corner of old table, and M1 is a cell right above top left corner of new table. And then you will easily count needed values from this new one by simpliest formula ever:
Код
=СЧЁТЕСЛИ($M$2:$U$25;A12)
Where M2:U25 is new table area and A12 is a value that we are seeking.
If you want formula so bad then you might be interested by my next idea. In attached file you will find solution with constructing one more table the same size as original. Only one formula for constructing such table is needed:
Код
=ЕСЛИ(C2="";M1;C2)
Where C2 is top left corner of old table, and M1 is a cell right above top left corner of new table. And then you will easily count needed values from this new one by simpliest formula ever:
Код
=СЧЁТЕСЛИ($M$2:$U$25;A12)
Where M2:U25 is new table area and A12 is a value that we are seeking.Rioran