Домашняя страница Undo Do New Save Карта сайта Обратная связь Поиск по форуму
МИР MS EXCEL - Гость.xls

Вход

Регистрация

Напомнить пароль

 

= Мир MS Excel/Количество связанных клеток - Мир MS Excel

Старая форма входа
  • Страница 1 из 1
  • 1
Модератор форума: китин, _Boroda_  
Мир MS Excel » Вопросы и решения » Вопросы по Excel » Количество связанных клеток (Формулы/Formulas)
Количество связанных клеток
İstak Дата: Четверг, 28.08.2014, 09:35 | Сообщение № 1
Группа: Пользователи
Ранг: Новичок
Сообщений: 39
Репутация: 1 ±
Замечаний: 40% ±

Excel 2013
Примеры дося
К сообщению приложен файл: FR.xlsx (15.4 Kb)
 
Ответить
СообщениеПримеры дося

Автор - İstak
Дата добавления - 28.08.2014 в 09:35
Rioran Дата: Четверг, 28.08.2014, 10:22 | Сообщение № 2
Группа: Авторы
Ранг: Ветеран
Сообщений: 903
Репутация: 290 ±
Замечаний: 0% ±

Excel 2013
İstak, hello.

I have a UDF (User Defined Fucntion) solution. VBA way. For testing check attached file.

[vba]
Код
Function RioCounter(RioName As String, RioRange As Range) As Long

'Author:    Roman Rioran Voronov
'Date:      the 28-th of August, 2014
'Feedback:  voronov_rv@mail.ru

Dim rngX As Range

For Each rngX In RioRange
     If rngX.Value = RioName Then
         RioCounter = RioCounter + rngX.MergeArea.Count
     End If
Next rngX

End Function
[/vba]
К сообщению приложен файл: Merge_Counter.xlsm (25.2 Kb)


Роман, Москва, voronov_rv@mail.ru
Яндекс-Деньги: 41001312674279
 
Ответить
Сообщениеİstak, hello.

I have a UDF (User Defined Fucntion) solution. VBA way. For testing check attached file.

[vba]
Код
Function RioCounter(RioName As String, RioRange As Range) As Long

'Author:    Roman Rioran Voronov
'Date:      the 28-th of August, 2014
'Feedback:  voronov_rv@mail.ru

Dim rngX As Range

For Each rngX In RioRange
     If rngX.Value = RioName Then
         RioCounter = RioCounter + rngX.MergeArea.Count
     End If
Next rngX

End Function
[/vba]

Автор - Rioran
Дата добавления - 28.08.2014 в 10:22
İstak Дата: Четверг, 28.08.2014, 10:28 | Сообщение № 3
Группа: Пользователи
Ранг: Новичок
Сообщений: 39
Репутация: 1 ±
Замечаний: 40% ±

Excel 2013
Rioran thanks,
How do we do this operation with the function?


Сообщение отредактировал İstak - Четверг, 28.08.2014, 11:39
 
Ответить
СообщениеRioran thanks,
How do we do this operation with the function?

Автор - İstak
Дата добавления - 28.08.2014 в 10:28
Rioran Дата: Четверг, 28.08.2014, 11:21 | Сообщение № 4
Группа: Авторы
Ранг: Ветеран
Сообщений: 903
Репутация: 290 ±
Замечаний: 0% ±

Excel 2013
İ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.]


Роман, Москва, voronov_rv@mail.ru
Яндекс-Деньги: 41001312674279
 
Ответить
Сообщениеİ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
Дата добавления - 28.08.2014 в 11:21
İstak Дата: Четверг, 28.08.2014, 11:38 | Сообщение № 5
Группа: Пользователи
Ранг: Новичок
Сообщений: 39
Репутация: 1 ±
Замечаний: 40% ±

Excel 2013
Rioran,
I know how to use the UDF. ;)
How this process is done by the formula? Wondering
http://www.excelworld.ru/forum/2-7849-1


Сообщение отредактировал İstak - Четверг, 28.08.2014, 11:39
 
Ответить
СообщениеRioran,
I know how to use the UDF. ;)
How this process is done by the formula? Wondering
http://www.excelworld.ru/forum/2-7849-1

Автор - İstak
Дата добавления - 28.08.2014 в 11:38
Rioran Дата: Четверг, 28.08.2014, 14:10 | Сообщение № 6
Группа: Авторы
Ранг: Ветеран
Сообщений: 903
Репутация: 290 ±
Замечаний: 0% ±

Excel 2013
İ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)?


Роман, Москва, 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)?

Автор - Rioran
Дата добавления - 28.08.2014 в 14:10
Rioran Дата: Четверг, 28.08.2014, 14:25 | Сообщение № 7
Группа: Авторы
Ранг: Ветеран
Сообщений: 903
Репутация: 290 ±
Замечаний: 0% ±

Excel 2013
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.
К сообщению приложен файл: MergeHint.xlsm (21.0 Kb)


Роман, Москва, voronov_rv@mail.ru
Яндекс-Деньги: 41001312674279


Сообщение отредактировал Rioran - Четверг, 28.08.2014, 14:25
 
Ответить
Сообщение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
Дата добавления - 28.08.2014 в 14:25
İstak Дата: Четверг, 28.08.2014, 15:34 | Сообщение № 8
Группа: Пользователи
Ранг: Новичок
Сообщений: 39
Репутация: 1 ±
Замечаний: 40% ±

Excel 2013
Rioran,
Beautiful things learned
Thank you,
Best Regards


Сообщение отредактировал İstak - Четверг, 28.08.2014, 15:35
 
Ответить
СообщениеRioran,
Beautiful things learned
Thank you,
Best Regards

Автор - İstak
Дата добавления - 28.08.2014 в 15:34
Мир MS Excel » Вопросы и решения » Вопросы по Excel » Количество связанных клеток (Формулы/Formulas)
  • Страница 1 из 1
  • 1
Поиск:

Яндекс.Метрика Яндекс цитирования
© 2010-2024 · Дизайн: MichaelCH · Хостинг от uCoz · При использовании материалов сайта, ссылка на www.excelworld.ru обязательна!