# Using the CONTAINS function

✭✭✭
edited 06/05/23

I am attempting to add a search criteria to an existing function. The current, working function is

=SUMIFS({Total Seat Count}, {Region}, ="US East") + SUMIFS({Total Seats Archive}, {Region Archive}, ="US East")

I would like to create a new function that will specify a count with a specific unit name "VFX" found in the column "VM Name".

=SUMIFS({Total Seat Count}, {Region}, ="US East", ({VM Name}, CONTAINS("VFX", @cell)) + SUMIFS({Total Seats Archive}, {Region Archive}, ="US East") + 43)

I believe I am formatting this as given in this example on SS:

([Sold Date], CONTAINS("1:55 AM", @cell))

However, I get unparseable so can't figure out where I am going wrong.

• ✭✭✭✭✭✭

Was the first formula copied correctly? There is a mismatch in the number of opening/closing parentheses in both formulas.

• ✭✭✭

I think so. First formula works great, and has been for over a year

• ✭✭✭✭✭✭

I'm not sure if this is what you are looking for. I removed a couple of parentheses that I'm not sure should have been there.

=SUMIFS({Total Seat Count}, {Region}, ="US East", {VM Name}, CONTAINS("VFX", @cell)) + SUMIFS({Total Seats Archive}, {Region Archive}, ="US East") + 43

• ✭✭✭

I get "#INCORRECT ARGUMENT SET". When I try that.

• ✭✭✭

Well, I think I have it.

=SUMIFS({Total Seat Count}, {VM Name}, CONTAINS("us-e-vfx", @cell), {Region}, "US East")

Seems to work but the SUM is off...I'll work that out

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!