+ Reply to Thread
Results 1 to 2 of 2

Take header and cell data place within text/ summary cell

  1. #1
    Registered User
    Join Date
    11-02-2009
    Location
    Wicklow, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    1

    Take header and cell data place within text/ summary cell

    I want to automatically take header title plus any data in cell (by row) and make a summary. Might be better to explain the application though so here goes:

    I have a table with footbal scorers (name as headers, goals as cell data).
    Each team has a squad of 16. Each row under the header represents a match, cells under header show goals (if any) are scored by the player of that column (header).

    I want to be able to have a summary cell (so it can be copied out to reports etc) where scorers are listed with goals scored in () - but the summary cell contains all players scoring in that match.

    What I have is (assume players Name1...Name16 are header names):
    Row 1 Column A Column B ....
    Row 2 Name1 Name2
    Row 3 {blank} 2
    Row 4 1 3
    Row...

    What I want in Cell Q3 is Name2
    What I want in Cell Q4 is Name1, Name2 (3)

    i.e. Just Name (when only 1 goal is scored) plus Name (x) where x goals are scored. If more than one scorer in a match (row is a match) then the cell concatenates to give list.

    Any ideas?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Take header and cell data place within text/ summary cell

    Install this code in your VB editor (Alt+F11)

    Please Login or Register  to view this content.
    Then in Q3:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER

    and then copied down

    You can alternatively, download addin called Morefunc.xll from here: Morefunc.xll

    and then use formula:

    Please Login or Register  to view this content.
    again, confirmed with CTRL+SHIFT+ENTER not just ENTER..
    Last edited by NBVC; 11-02-2009 at 05:29 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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