Google-sheets – Sum columns based on conditions

google sheets

I am working for a webhosting company and we are tracking our efforts with Google Sheets.

I was trying to find a solution for the following problem:

We track our efforts by clients per day, so that they can be invoiced individually. So for one day I have a list of several clients I have worked for today with a column of start time, one for end time and one for the time I worked for this client.

When invoicing clients I have to look through the whole sheet for every client and look up manually how long I have been working for them.

Is there a way I can simplify this process? I am thinking of a field in the sheet which give me the effort I had with this client. Something like:

If(B2 = "client1", Sum(H1;H90))

Important about this: I work for several clients each day. So I need a way to check in one column for the client name and then sum the efforts up in a several fields.

Best Answer

Are you looking for something like this?

=SUMIF(C1:C,"client2",G1:G)

or if you want it more dynamic, for example if you want to have one cell that you can choose which client you want to see hours for, then alter the part that says "client2", to point to a single cell in which you will put the client you want to see.