+ Reply to Thread
Results 1 to 7 of 7

Summing a Range Where Column Header Appears in a Concatenated Cell

  1. #1
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,626

    Summing a Range Where Column Header Appears in a Concatenated Cell

    I am sure I could work this out in time, but I've run out of it today!

    This should be copyable into a workbook for anyone who's willing to help. I am sure there's a new dynamic array function or two that would help.

    Excel 2016 (Windows) 32 bit
    V
    W
    X
    Y
    Z
    AA
    AB
    AC
    AD
    AE
    8
    A
    B
    C
    D
    E
    F
    Total
    Groups
    Blocks
    No Fits
    9
    29
    29
    1
    A
    0
    10
    19
    21
    11
    2
    53
    3
    A,B,C
    2
    11
    13
    1
    1
    18
    33
    2
    A,D
    2
    Sheet: GCSE Options 2021

    I'm trying to think of a way of shortening this:

    Excel 2016 (Windows) 32 bit
    AE
    9
    =IF(AND(ISERROR(FIND(V$8,$AD9)>0),V9<>""),V9,0)+IF(AND(ISERROR(FIND(W$8,$AD9)>0),W9<>""),W9,0)+IF(AND(ISERROR(FIND(X$8,$AD9)>0),X9<>""),X9,0)+IF(AND(ISERROR(FIND(Y$8,$AD9)>0),Y9<>""),Y9,0)
    Sheet: GCSE Options 2021

    It's the cells in red with white text that need summing - these are the choices that are out of block (that is not in a block that has been allocated in column AD). Cells in columns V to Y (which are the ones I'm interested in) contain formulae which return a value or a blank.

    I'm at work, so can't prepare a sample workbook now, but could later if deemed necessary.

    Thanks!
    Last edited by AliGW; 03-01-2021 at 11:57 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Summing a Range Where Column Header Appears in a Concatenated Cell

    one option:

    =SUMPRODUCT(ISERR(SEARCH(","&V8:AA8&",",","&AD9:AD11&","))+0,V9:AA11)
    would return 4

    edit: if this is for AE9:AE11 then

    AE9: =SUMPRODUCT(ISERR(SEARCH(","&$V$8:$AA$8&",",","&$AD9&","))+0,$V9:$AA9)
    copied down (would return 0, 2, and 2)

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,626

    Re: Summing a Range Where Column Header Appears in a Concatenated Cell

    That's clever, but not actually quite what I need, however I think I can adapt it - thanks! Will report back.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,626

    Re: Summing a Range Where Column Header Appears in a Concatenated Cell

    Thanks again. This works for what I need:

    =SUMPRODUCT(ISERR(SEARCH(","&$V$8:$Y$8&",",","&$AD9&","))+0,$V9:$Y9)

    I'm curious to see if there's a solution using any of the new 365 functions, though, but this is much more streamlined than my original 4-parter!!!

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,071

    Re: Summing a Range Where Column Header Appears in a Concatenated Cell

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,626

    Re: Summing a Range Where Column Header Appears in a Concatenated Cell

    I’m going to try this one in the morning - thank you!

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,071

    Re: Summing a Range Where Column Header Appears in a Concatenated Cell

    My pleasure & thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. return multiple header cell values into one cell concatenated based on a cell value
    By anchuri_chaitanya in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-13-2016, 10:27 PM
  2. [SOLVED] Summing Rows based on Column Header
    By HCLax in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-01-2015, 09:56 AM
  3. Replies: 4
    Last Post: 12-19-2014, 05:38 PM
  4. Replies: 1
    Last Post: 10-05-2013, 03:35 PM
  5. Replies: 6
    Last Post: 01-30-2008, 01:30 PM
  6. [SOLVED] concatenated to create a header :Macro Help
    By Bob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2005, 10:05 AM

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