+ Reply to Thread
Results 1 to 11 of 11

Transpose values in column to rows, and split cell values to extend column

  1. #1
    Registered User
    Join Date
    03-27-2015
    Location
    Nowhere, USA
    MS-Off Ver
    2013
    Posts
    4

    Question Transpose values in column to rows, and split cell values to extend column

    This one's a little weird, so I apologize in advance, but I can't set up a formula to do it for me reliably. I've attached the working file, the 'START' tabs are samples of the tabs that I receive, and the 'COMPLETE' tabs are those tabs as I need them. Currently this restructuring is a manual process, and these sheets are typically x times longer, so it's a laborious process. I need a VB macro to speed up this reconstruction, and I'm about as good with Excel macros as I am with braille.

    I may be convinced to pay for the macro that solves this issue for me, as it would speed up portions of my day quite a bit. I think the tabs are fairly clear, but let me know if they aren't.

    SKU SHEET.xlsx

  2. #2
    Registered User
    Join Date
    03-27-2015
    Location
    Bristol, England
    MS-Off Ver
    2010
    Posts
    4

    Re: Transpose values in column to rows, and split cell values to extend column

    Hi,

    I'm not entirely sure what you want done here? You want the cells split by the hyphens? so "09778GRY-A" would become "09778GRY" and "A"?

    Then the data transposed?

    Please show a subset of the data (i.e. 3 or four rows) with what you want as the end result in a separate sheet. I'll then try to offer any help I can.

    Alex

  3. #3
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Transpose values in column to rows, and split cell values to extend column

    Hi..
    This will get you 1/2 of your problems solved.. (and quite fast I must say.. ) In the attached Workbook... Click the blue "Click!" button on the "PRICE LIST START" sheet and see the result on "Sheet1".

    If i get time.. I will look at the other half of your problem..


    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-27-2015
    Location
    Nowhere, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Transpose values in column to rows, and split cell values to extend column

    Quote Originally Posted by alex.harrison View Post
    Hi,

    I'm not entirely sure what you want done here? You want the cells split by the hyphens? so "09778GRY-A" would become "09778GRY" and "A"?

    Then the data transposed?

    Please show a subset of the data (i.e. 3 or four rows) with what you want as the end result in a separate sheet. I'll then try to offer any help I can.

    Alex
    Within the workbook there are 4 tabs. The two 'START' tabs are how the tabs are given to me, and the 'COMPLETE' tabs are how I need the 'START' tabs to be structured in their final state. The red comments gives a brief idea what needs to be done, but comparing the 'START' and 'COMPLETE' tabs make it fairly clear what needs to be done.

    Quote Originally Posted by apo View Post
    Hi..
    This will get you 1/2 of your problems solved.. (and quite fast I must say.. ;) ) In the attached Workbook... Click the blue "Click!" button on the "PRICE LIST START" sheet and see the result on "Sheet1".

    If i get time.. I will look at the other half of your problem..
    Wonderful, that works perfectly, Apo. I hope you find time for the second half. :) :P

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Transpose values in column to rows, and split cell values to extend column

    Please find the attached workbook and on any of the Test SKU sheets, press the shortcut key Ctrl+Shift+K to run the code and see if you get the desired output.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Registered User
    Join Date
    03-27-2015
    Location
    Nowhere, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Transpose values in column to rows, and split cell values to extend column

    Hey sktneer, thanks for that. Slight problem though, and it's my fault: your script doesn't take into consideration there being more than a maximum of 3 sub-SKUs. In other working examples I've got more, and while it seems to push the value columns over, the header row only extend 3 out. This is my fault, though, my example material doesn't have any of these.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Transpose values in column to rows, and split cell values to extend column

    Not sure what are you talking about.
    I think that I considered that and made the code dynamic to pick the max number of SKUs to insert column headers accordingly.

    See the attached. Where I have inserted two more rows for 08036G-08022B-08021A-KIT so now it has max 5 records for this base sku and after running the code I get 5 column headers for ExtraSKU, SKUCost and BasePrice. See the Result Sheet which has the output or run the code on Test SKU2 to see if this is not what you were trying to achieve.
    Attached Files Attached Files

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Transpose values in column to rows, and split cell values to extend column

    Give these a try
    PriceList
    Please Login or Register  to view this content.
    SKU LIST
    Please Login or Register  to view this content.
    Last edited by mike7952; 03-28-2015 at 01:26 AM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  9. #9
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Transpose values in column to rows, and split cell values to extend column

    @mike7952...

    I tested both your subs and they work well...

  10. #10
    Registered User
    Join Date
    03-27-2015
    Location
    Nowhere, USA
    MS-Off Ver
    2013
    Posts
    4

    Re: Transpose values in column to rows, and split cell values to extend column

    Sorry for the lack of response guys, I've been swamped.

    mike, your subs seem to work (yay!), but they seem dependent on the sheets as they are in the example being named as they are and existing in worksheets outside of the example. This is my fault, but the example sheet names and which exist are really just to show what I get and what I need it to become.

    So my working sheets will likely not have "X LIST START" and "X LIST COMPLETE" sheets, and will most likely be different names.

    Ideally I'd like the script to act on the current active sheet, and create a new sheet entirely of the completed modification.

    I changed sktneer's to act with ActiveSheet.Name & " (Modified)" or something to make it more adaptable, but I wasn't sure how to incorporate that change into your subs.

  11. #11
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Transpose values in column to rows, and split cell values to extend column

    @SAMMM

    This should do what you need. Will work on activesheets and create a new sheet for output.

    PriceList
    Please Login or Register  to view this content.
    SKU_LIST
    Please Login or Register  to view this content.

+ 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] Transpose a long column into delimiters separated values according to values in input box
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-27-2014, 01:32 PM
  2. Transpose values from column to rows (one cell) with conditions
    By zeko90 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2013, 08:21 AM
  3. Split Rows For Unique Values In A Column To Different Workbooks
    By ashishmac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2013, 02:45 PM
  4. Split cell data into multiple new rows and copy other column values
    By jooga in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-01-2010, 02:30 AM
  5. Transpose unique values in one column/mult. rows into a single row
    By Wil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2005, 04:06 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