# SUMIF with Dynamic Criteria

1. ## SUMIF with Dynamic Criteria

I am trying to do:

=sumif(a:a,"=\$c3&d\$2",b:b)

Basically, I have a box I want to fill, with a row of names and a column of names along the left side and top. A:A has all of the different combinations of all of the different names (concatenated). So, I would like to drag that formula through the box and have all of the cells fill with the proper sum of the concatenated row and column header. Sorry if this is a little convoluted.

It only seems to want to match \$c3&d\$2 and not actually match what the concatenation is. I looked online and it looks like sumif only works with concrete things, like "dog" or "5", not with formulas that can change.

Does anyone know how to get the above to work or a different formula that would do the same thing?

Thanks!

2. ## Re: SUMIF with Dynamic Criteria

The quotes mean that \$c3&d\$2 is treated as literal text rather than cell references try this version in D3 copied across and down

=SUMIF(\$A:\$A,\$C3&D\$2,\$B:\$B)

3. ## Re: SUMIF with Dynamic Criteria

=sumif(a:a,"="&\$c3&d\$2,b:b)
should do it.

4. ## Re: SUMIF with Dynamic Criteria

Nice! Thank you very much. I went with daddylonglegs approach, but thank you all for the help.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1