# LO Spreadsheet: If cell-range contains X, then do Y [closed]

I'm unsure how to do this.

Task: If e.g. cell B12 to B41 contains value "1", then and only then, create SUM of cells C12 to C41 with the value they have (but only for the rows in which the B-column does have a value "1") and enter that value into target cell C 60.

Maybe I better describe what I'm trying to do here: I keep track of something in a table that has colums Mo-So for the weekdays in which I enter a 1 if the event is on that day. Next to that I have columns going from 9-24 which is the hour of the day. If a certain even happens I enter a "1" for that hour of the day.

What I now want is some formula that does the following: Create a nice weekly table for all weekdays and add events at the correct hour they happened.

I'm unsure how to do this. Guess it's possible but the formula needed makes me dizzy and I don't know where to start.