+ Reply to Thread
Results 1 to 4 of 4

SUMIF with Dynamic Criteria

  1. #1
    Registered User
    Join Date
    10-09-2009
    Location
    Cambridge, MA
    MS-Off Ver
    Excel 2003
    Posts
    61

    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!
    Last edited by nofzinger; 05-11-2010 at 06:17 PM.

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,676

    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. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: SUMIF with Dynamic Criteria

    =sumif(a:a,"="&$c3&d$2,b:b)
    should do it.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    10-09-2009
    Location
    Cambridge, MA
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: SUMIF with Dynamic Criteria

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

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