+ Reply to Thread
Results 1 to 8 of 8

Single column with internal section headers

  1. #1
    Registered User
    Join Date
    12-07-2013
    Location
    Long Beach
    MS-Off Ver
    Excel 2013
    Posts
    4

    Single column with internal section headers

    I have been pulling my hair to get this seemingly doable problem solved. The solution should work on Excel 2007 or later. I'd like to create a single column with header text and blank cells based upon two columns as follows:

    X A B
    1 1 Jack
    2 1 Steve
    3 1 Mary
    4 2 Salima
    5 2 Michael
    6 2 Roberto
    7 2 Stella
    8 3 Jean
    9 3 Penelope

    The resulting column would be formatted as follows:

    X C
    1 Section 1
    2
    3 Jack
    4 Steve
    5 Mary
    6
    7 Section 2
    8
    9 Salima
    10 Michael
    11 Roberto
    12 Stella
    13
    14 Section 3
    15
    16 Jean
    17 Penelope

    Ideally I'd like to create an array formula that can be created in the first cell of the column then copied down the column. I cannot use a macro for this function as the client only can accept non-macro-based xlsx sheets. I can use helper columns if necessary. Thanks.
    Last edited by MS Excel Sheet Pro; 10-10-2017 at 12:14 PM. Reason: Added helper columns comment.

  2. #2
    Registered User
    Join Date
    12-07-2013
    Location
    Long Beach
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Single column with internal section headers

    I'm attaching an excel sheet with the same data as the question here.
    Attached Files Attached Files

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Single column with internal section headers

    I don't think that you will be able to get exactly what you're looking for through formulas alone.

    That being said, this provides the expected solution except for some additional/unwanted spacing.

    See attached workbook for reference.

    D1 ="Section "&IFERROR(INDEX($A2:$A10,MATCH(0,COUNTIF($C1:C1,"Section "&$A2:$A10),0)),"") Ctrl Shift Enter
    Drag this through F1

    D3 =IFERROR(INDEX($B$2:$B$10,SMALL(IF($A$2:$A$10=RIGHT(D$1)+0,ROW($A$2:$A$10)-(ROW($A$2)-1)),ROWS($A$1:$A1))),"") Ctrl Shift Enter
    Drag this through F3 and then down until you get blanks (F7 in this example).

    I2 =IFERROR(INDEX(D$1:F$6,MOD(ROW(A1)+ROWS(D$1:F$6)+1,ROWS(D$1:F$6)+1),1+INT(ROW(A1)/(ROWS(D$1:F$6)+1))),"")&""
    Drag this down until you get blanks (I20 in this example).
    Attached Files Attached Files

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Single column with internal section headers

    Maybe PivotTable with blank rows after each item (but without section header)
    Last edited by sandy666; 10-10-2017 at 01:01 PM.

  5. #5
    Registered User
    Join Date
    12-07-2013
    Location
    Long Beach
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Single column with internal section headers

    Sandy's pivot table works perfectly as a helper column. It's very easy to format the final column by numerical value identifier.

    On the same token, 63falcondude's solution is intriguing. I think I can take a better look at it. I'm trying to use Excel Magic Trick 185 Dynamic Formula Extract Data (Youtube video) and try to mix and match with Falcon's answer. Ideally, I'd love to come up with a magic formula so I don't have to require a pivot table, but that's just my nerdy challenge need at work.
    Last edited by MS Excel Sheet Pro; 10-10-2017 at 03:44 PM. Reason: Added "Solved" comment

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Single column with internal section headers

    Whatever work for you - it's good

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it - ignore it.
    Thank you.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Single column with internal section headers

    Thanks for the rep!

    Sandy, I didn't even think about a Pivot Table for this. That's a good solution.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Single column with internal section headers

    @63falcondude
    @MS Excel Sheet Pro

    thanks for rep and 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. [SOLVED] Multiple Headers, Same Footer-Section Break Issues
    By liquidmettle in forum Word Formatting & General
    Replies: 4
    Last Post: 04-21-2016, 10:30 AM
  2. [SOLVED] Copy Multiple Column Headers to single cell if conditions met
    By eadamquinn in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-08-2015, 08:55 AM
  3. [SOLVED] listbox with column headers as a specific sheet column headers
    By ANDREAAS in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-07-2014, 04:40 AM
  4. Replies: 0
    Last Post: 09-11-2013, 09:54 AM
  5. [SOLVED] Tracking internal rejections with multiple operators on single machine
    By greggatz in forum Access Tables & Databases
    Replies: 1
    Last Post: 06-11-2013, 12:46 AM
  6. Formula To Pull Through Headers For Each Section
    By mccrimmon in forum Excel General
    Replies: 1
    Last Post: 03-30-2012, 07:03 AM
  7. Parse items include repeat section headers
    By Leeb1800 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-12-2011, 02:07 PM

Tags for this Thread

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