sum hours from a column, if grandchild row in another column has specific text

tlawrence17
tlawrence17 ✭✭
edited 12/09/19 in Formulas and Functions

So I've been tasked with creating a timesheet for our consultant agency by quarter, so each sheet will cover three months, why it has to be in Smartsheet I'm not sure.

Context

Each day, employees have three types of projects they can be working on: "Proj1", "Proj2", "Proj3".

I need a formula that will add up all the project hours for the month of January.

In the dummy data from the image, you can see there were 21 hours total worked in January. I need to figure out how many of them were on Proj1 (should be 5).

Formula

However I can't seem to find a formula that works for this.

I came close with this formula: =SUMIF(Primary:Primary, "Proj1", Hours:Hours)

It works until hours from February are added, then they end up being included. I need to find a way to search the grandchildren rows of the January parent, where the project types are listed for say, "Proj1" and add those hours.

I'm thinking something like: =SUMIF(CHILDREN(Primary2), FIND("gUP"), Hours:Hours) but I know I'm getting it wrong.

 

Screen Shot 2019-11-22 at 3.21.24 PM.png

Tags:

Comments

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!