# Formula - adding two columns based on a condition

edited 12/09/19

I think I'm close but this is driving me crazy.

I have an event code column and two other columns where I am collecting participation data on Saturday and Sunday.

I would like to know the total participation for the weekend. The formula for just Saturday or just Sunday works

=SUMIF([Event Code]:[Event Code], "CL021718A", ([# Sat]:[# Sat]))

but I can't find the way to combine the two.

I had assumed I now had to use SUMIFS... here's what I've been trying...

=SUMIFS([Event Code]:[Event Code], "CL021718A", ([# Sat]:[# Sat]), ([# Sun]:[# Sun]))

Any insights would be so appreciated!

-Melissa

• ✭✭✭✭✭✭

The way to accomplish this is to use simple math to add two countif formulas together.  The following formula should do the trick -- if I titled your columns correctly.

=SUMIF([Event Code]:[Event Code], "CL021718A", [# Sat]:[# Sat]) + SUMIF([Event Code]:[Event Code], "CL021718A", [# Sun]:[# Sun])

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!