IF formula question

Hello all.

Please see the example doc I have uploaded in order to supplement my question:

IF function for “active” column example.ods

I am in need of a formula that states that If a cell in the “ACTIVE?” column reads “YES”, then the adjacent time in the “TIME INVESTED DAILY” column is added to the “TOTAL TIME” column.
Conversely, if the “ACTIVE?” column doesn’t say “YES”, then the figure in the “TIME” column should not be added to the “TOTAL TIME” column.

I think that, To use cell D2 as a starting point, the formula needs to start with something along the lines of =IF(C2= “Yes”, but am not sure where to go from there.

Thanks in advance.

=IF(C2= "Yes",B2,"")

Is Total Time a running total of the values in D? If so, the attached file may do what you want, or at least point you in the right direction. I’ve used the UPPER function to test the value in C, so it can be Yes, YEs, yEs, etc. Note the formula in D2 is different from the rest of D to allow for no previous total.

ifquery.ods

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.