+ Reply to Thread
Results 1 to 25 of 25

multiple rows down to one row - transpose not the solution

  1. #1
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    multiple rows down to one row - transpose not the solution

    I have a 107k plus line spreadsheet with multiple lines per material as each material is extended to multiple sales organizations (countries). I have managed to get the piece of info I need into columns by sales org but still on individual lines. I need a way to put all of these values on one line by sales org. Also, I don't know macros or VBA so I need a formula way to accomplish this. Attached is the before and after that I need.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    It strikes me that you need a unique list of materials - do you already have that? Your example file shows only one material for different sales orgs, so it is not much use in testing a more generalised solution to you problem. Can you submit another example file with a bit more data in it?

    Pete

  3. #3
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Absolutely happy to. I appreciate it. See if this is more helpful.
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    I don't think there is an easy way of doing this using formulae. As you are dealing with text values, you will have to carry out multiple concatenation (with mainly blanks being joined to the one value within the range for a particular material), and Excel is not very good at doing that. In your example data, similar materials are grouped together - is that always the case in your real data, or have you just arranged it like that for the example?

    Pete

  5. #5
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    The file is sorted first by material number yes. I can convert the material numbers to Number format instead of text if that helps.
    Last edited by shdwfx; 01-15-2014 at 01:44 PM.

  6. #6
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    I have a co-worker who has accomplished this in the past. Unfortunately he is tied up on a project.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    You have filter drop-downs in columns O to BK, but no data in those columns. Is this because you have deleted irrelevant data from those columns in your real file? I want to use a helper column to identify the last record for each material type, and I need to know which column to use.

    Pete

  8. #8
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Just columns I neglected to delete and not needed.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    Okay, well I've used column O as the helper and it wasn't as difficult as I first thought (see attached file). It is important to put zero in cell O3 and then you can put this formula in O4:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    which can be copied down to the bottom of your data (I've shown it in blue). Then insert a new sheet (Sheet1) and put the headings on rows 1 and 2 with this formula in A3:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    this returns the first material number, and you can copy the formula into B3 to get the Material Description. It relies on the data being sorted by material number. Then put this formula in C3:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy that across to K3. Then you can copy the formulae from A3:K3 down as far as you need to (until you get hyphens in columns A and B - I've copied to row 14 in the example). This will give you a unique list of materials with the breakdown as requested.

    There is something strange about the data in your posted file, though. If you highlight the cells F4:N22 on Sheet2, then press F5 (GoTo), then click on Special and on Blanks, then you can see that not all of the empty cells are selected. This suggests that they are not empty (and this was throwing out my formula for the first material), but if you enter =LEN(F4) in a blank cell you get 0, and =CODE(F4) returns #VALUE, both of which indicate that they are empty. Furthermore, if you select one of the cells and click on the formula bar as if to edit it (or press F2) then press <Enter> without doing anything, then the cell does appear to be blank if you repeat the F5 exercise. I don't know what's happening here, but I had to delete those cells in order to get the final formula to work (as it looks for the last non-empty cell in the range).

    Anyway, it seems to be working, so you'll need to try it out on your real data.

    Hope this helps.

    Pete
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Thank you! I will print this out and see if I can replicate in the real spreadsheet. I appreciate this!!

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    Okay, well if it takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, I would like to inform you that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  12. #12
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Thanks I will do that followup and thanks once again!

  13. #13
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    First formula went great but the second one isn't working. Not sure why so far.

  14. #14
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Nevermind I got it! Whew.

  15. #15
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    OK second formula entered successfully ....kindof. It works on the first line, I get hyphens on the second line, then it works on the next three lines, then hyphens for a line, works for four lines, hyphens one line, works one line, hyphens next line. Very strange. The third formula is working great. Just need to figure out what's wrong with the second one.
    Last edited by shdwfx; 01-15-2014 at 04:51 PM.

  16. #16
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Hi Pete. I'm stuck again. The second and third formula's are not quite working and I am back begging again. I would keep trying on my own but it's rather urgent. I created a larger sample file with your formulas but am not able to upload it for some reason (not because it's too large according to the error message which I can't translate). If you would be willing to help me offline, please e-mail me at xxxxxxxxxx in case the work spam filter traps you) and I will send you the file.
    Last edited by shdwfx; 01-16-2014 at 11:31 AM.

  17. #17
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    Okay, I've got your message, so I'll email you.

    Now, remove your email addresses from that last post (unless you want to get a load of spam).

    Pete

  18. #18
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    LOL awesome thanks!

  19. #19
    Registered User
    Join Date
    01-15-2014
    Location
    Newark, DE
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: multiple rows down to one row - transpose not the solution

    Just checking that you didn't message me yet in case there is any technical problem with receiving on my end.

  20. #20
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    I emailed you straightaway, so I'll forward it to your other address in case your works system blocked it.

    Pete

  21. #21
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    By the way, did you find out what may have caused the strange behaviour of the empty cells in the file you attached to Post #3? I'll ask if some of the other experts can offer an explanation.

    Pete

  22. #22
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: multiple rows down to one row - transpose not the solution

    contextures covers it..it is when you copy/paste from another data base(usually)
    http://blog.contextures.com/archives...from-database/
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  23. #23
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    Thanks for that, Martin - that is probably what happened.

    Pete

  24. #24
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: multiple rows down to one row - transpose not the solution

    another possibility is that the user used to have a formula returning blanks & they paste values. say we have a in A1 & A5
    Data Range
    A
    1
    a
    2
    3
    4
    5
    a

    A2:A4 are
    =""

    copy & paste special -> Values. do the F5 -> Blanks or CTRL DOWN from A1. it's as though they are not blanks.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  25. #25
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: multiple rows down to one row - transpose not the solution

    Yeah, thanks for that - that could be another cause. I don't know how the OP produced the file.

    Pete

+ 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] Converting Vertical Columns in to Horizontal Rows - (Better solution to Transpose)
    By ps_upasani in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-30-2013, 05:32 AM
  2. Replies: 4
    Last Post: 03-08-2013, 09:49 AM
  3. [SOLVED] How to transpose non-uniform data in multiple columns into multiple rows?
    By alexxgalaxy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-03-2013, 08:40 PM
  4. [SOLVED] Odd Transpose Query - likely requiring VBA solution
    By rodwhiteley in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2012, 07:30 AM
  5. further explaination of transpose solution
    By mchevalier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2011, 10:42 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