A
A
Alexander2018-08-30 15:11:24
excel
Alexander, 2018-08-30 15:11:24

How can I make a loop with a condition?

There is such a table.

Table screenshot
5b87dd328303a503791616.jpeg

Please advise how to implement the following. There is a column Типand there may be values Работа​​, Службаor Учёба. This type can be specified in different ways, for example, in cell B5 , instead of studying, there can be work. So, I need to calculate the sum of days from column F , but take into account only those days where column B (Type) says either only Work, or only Study, etc.
How can this be done? I tried to use the functions ЕСЛИ, ПРОСМОТР, ГПР, ВПР, but it did not work. I understand that you need to loop through column B , but how to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lvv85, 2018-08-30
@zkelo

Example for "Work"
=СУММЕСЛИ(B:B;"Работа";F:F)

D
dollar, 2018-08-30
@dollar

Make another column with the formula (on the second line):
I hope it's obvious what it does.
Further, this formula is stretched to the entire column. B2 will become B3, B4, etc. Also F2, F3, etc.
Well, then this column can already be summarized.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question