+ Reply to Thread
Results 1 to 6 of 6

Formula that sums up text from different cells (return multiple column headers in one cell

  1. #1
    Registered User
    Join Date
    10-13-2010
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    11

    Formula that sums up text from different cells (return multiple column headers in one cell

    Dear All,

    I have a list - attached an easy example.
    Basically I need a formula to enter in B2, which will summarise for each item in which states it is being sold (if >0 display state abbreviation).
    is it possible to do this with a formula - without macros etc?
    Kind regards,
    Sandra

    example.xlsx[table="width: 500"]

    States AR AZ FL
    Item 1. AR, AZ 1 5 0
    Item 2 0 0 0
    Item 3 AZ, FL 0 2 3
    Last edited by sab128; 09-08-2017 at 02:04 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula that sums up text from different cells

    given your example

    g2 =SUM(C2:F2) and drag down.



    I would solve this using pivot table
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formula that sums up text from different cells

    you add in your profile you use excel 2003 (xls), but you post an xlsx file (2007 or further).

    With version do you use?

    I used power pivot to rearange the data (excel 2010 add in / excel 2016 standard).

    After that a pivot table.

    See the attached file.

  4. #4
    Registered User
    Join Date
    10-13-2010
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Formula that sums up text from different cells

    Many thanks - was hoping to solve this without pivot (as the spreadsheet where I am using it is quite large), but not sure whether that's possible.. I am using excel 2007

  5. #5
    Registered User
    Join Date
    10-13-2010
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    11
    Need to Display text and not sum up values though..

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Formula that sums up text from different cells (return multiple column headers in one

    How many states are included?

    I suspect that you'll need a UDF to do this neatly.

    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
    [B][I]


    Then use the array-entered UDF:
    =ConcatAll(IF($C2:$F2>0,$C$1:$F$1,""),", ")


    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

+ 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. [SOLVED] Formula that SUMS cells per month
    By mrcois in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2012, 06:02 AM
  2. [SOLVED] Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  3. Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. [SOLVED] Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  6. Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. [SOLVED] Need a formula that sums a column but could exclude some cells
    By Watercolor artist in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-04-2005, 06: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