+ Reply to Thread
Results 1 to 2 of 2

Transpose or flatten out cell data

  1. #1
    Registered User
    Join Date
    02-09-2017
    Location
    Michigan
    MS-Off Ver
    Pro 2013
    Posts
    1

    Transpose or flatten out cell data

    Reaching out for some help. Trying to write a function or expression (prefer VBA function) for flattening out on a row starting on Column L. I’m not too bad with VBA and I’ve wrote several functions for this but cannot get the logic correct in code. If Column I6 has a value and blanks underneath then user (Col J) needs to flatten (transpose users) out on the row until the next RW.NAME. So in the attached pic the users would start populating on L out 5 columns. After I would drag the function down I would then cleanup and delete rows 6 – 10. I also tried an expression using an array w/ TRANSPOSE but didn’t get that to work either.
    Quite frustrated. Would appreciate any help or ideas. See pic for example.
    Using Excel 2013 32 bit.


    Thanks
    Bryan Karsten
    ExcelTranspose.png

  2. #2
    Forum Contributor
    Join Date
    01-07-2013
    Location
    south africa
    MS-Off Ver
    Excel 2003-13
    Posts
    210

    Re: Transpose or flatten out cell data

    Hello Bryan
    The only downside with function would be that you would need to copy that function to all the cells in column K
    I suggest a subroutine.

    My approach would be :
    • create loop from row 1 to last row
      run through column I cell by cell
      if the cell below is empty -> count number of empty cells until next value
      run FOR loop with count selecting offset cells and moving them across to current row and count column
      end of loop increment the rows to the next value
      repeat loop

    This should work if your data is consistent with the layout provided in the screenshot

    Regards
    Most helpful to mark solved items as such (see help for directions). Star ratings are always welcome.

+ 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. Flatten data in 3 column with a unique ID in one column
    By masuka9 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2015, 06:56 AM
  2. Flatten/ de-pivot
    By ccb81 in forum Excel General
    Replies: 1
    Last Post: 08-18-2014, 04:45 PM
  3. [SOLVED] Attempting to flatten multiple temporal data points for single identifier
    By cranialnerve in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-22-2013, 01:36 AM
  4. Flatten Data Script
    By JimmyA in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-15-2011, 12:08 PM
  5. Transpose data once cell at a time
    By willy91785 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-21-2010, 10:27 AM
  6. How to 'flatten' a set of values
    By JosVL in forum Excel General
    Replies: 3
    Last Post: 12-04-2009, 04:50 AM
  7. [SOLVED] flatten pivotTable
    By [email protected] in forum Excel General
    Replies: 5
    Last Post: 01-14-2005, 06:06 PM

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