+ Reply to Thread
Results 1 to 11 of 11

Sorting of similar cell info must transpose like-data from column to row

  1. #1
    Registered User
    Join Date
    06-16-2015
    Location
    New York
    MS-Off Ver
    2011 (mac)
    Posts
    6

    Sorting of similar cell info must transpose like-data from column to row

    Hello, and thanks for having a look at this post. I am looking to create a macro that can transpose like data from columns to a row. Thanks in advance for your response -Kcarth

    Example

    (before)
    1897-00.jpg
    1897-1.jpg
    1897-2.jpg
    1897-4.jpg
    1898-00.jpg
    1898-1.jpg
    1898-2.jpg
    1898-3.jpg
    1898-4.jpg
    1898-5.jpg
    1898-6.jpg
    1898-7.jpg
    1898-8.jpg
    1899-00.jpg
    1899-1.jpg
    1899-2.jpg
    1899-3.jpg
    1899-4.jpg
    1899-5.jpg
    1899-6.jpg
    1900-00.jpg
    1900-1.jpg
    1900-2.jpg
    1900-3.jpg
    1900-4.jpg
    1900-5.jpg
    1900-6.jpg


    (after)
    1897-00.jpg 1897-1.jpg 1897-2.jpg 1897-4.jpg
    1898-00.jpg 1898-1.jpg 1898-2.jpg 1898-3.jpg 1898-4.jpg 1898-5.jpg 1898-6.jpg 1898-7.jpg 1898-8.jpg
    1899-00.jpg 1899-1.jpg 1899-2.jpg 1899-3.jpg 1899-4.jpg 1899-5.jpg 1899-6.jpg
    1900-00.jpg 1900-1.jpg 1900-2.jpg 1900-3.jpg 1900-4.jpg 1900-5.jpg 1900-6.jpg

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting of similar cell info must transpose like-data from column to row

    This could do it:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 06-29-2015 at 10:54 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Sorting of similar cell info must transpose like-data from column to row

    Try this:-
    Data sheet1 column "A", Results sheet2.
    Please Login or Register  to view this content.
    Regards Mick

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Sorting of similar cell info must transpose like-data from column to row

    See if this works on Mac...
    Assuming your data in col.A and starts from A1
    Please Login or Register  to view this content.
    Last edited by jindon; 06-29-2015 at 12:04 PM. Reason: fixed a typo

  5. #5
    Registered User
    Join Date
    06-16-2015
    Location
    New York
    MS-Off Ver
    2011 (mac)
    Posts
    6

    Re: Sorting of similar cell info must transpose like-data from column to row

    Thanks JBeaucaire! According to our sample it, it worked perfectly! However, when dealing with characters and numbers there were discrepancies. If the filename started with ee then it didnt sort properly. The same was true for EE. It seems there is a problem with mixing characters and also a case sensitivity issue. I apologize for not giving an accurate example to begin with.

    Screen Shot 2015-06-29 at 12.54.51 PM.png
    Screen Shot 2015-06-29 at 12.43.15 PM.png

  6. #6
    Registered User
    Join Date
    06-16-2015
    Location
    New York
    MS-Off Ver
    2011 (mac)
    Posts
    6

    Re: Sorting of similar cell info must transpose like-data from column to row

    Also Thank you Mick and jindon

    Jindon - for yours we got a run time error '92'
    Mick - yours we got a run time error '429'

    Thank you for your help on these

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Sorting of similar cell info must transpose like-data from column to row

    OK, it is working on windows though...

    This should work.
    Please Login or Register  to view this content.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting of similar cell info must transpose like-data from column to row

    Correction to my macro using whatever string exists up the first "-" for the match string.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Sorting of similar cell info must transpose like-data from column to row

    Thanks for the reply. I'm sorry ,I did not see your computer is a "Mac", which my code will not work on,Hopefully you have another solution that works !!!

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Sorting of similar cell info must transpose like-data from column to row

    Maybe:

    Please Login or Register  to view this content.
    Places results in Column C.

  11. #11
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Sorting of similar cell info must transpose like-data from column to row

    Hi,

    Using collection object :

    Please Login or Register  to view this content.

    Regards

+ 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. Replies: 2
    Last Post: 04-19-2015, 05:30 PM
  2. [SOLVED] Excel 2013 - Header Info in Column A - Transpose Question
    By alyzar in forum Excel General
    Replies: 4
    Last Post: 04-07-2015, 02:19 PM
  3. [SOLVED] Sorting similar entries from one column, into respective rows
    By Captain Awol in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2013, 08:31 PM
  4. How to transpose a column based on similar values
    By tdunford7 in forum Excel General
    Replies: 4
    Last Post: 02-28-2012, 12:51 AM
  5. How to collapse Data into one line (similar to a transpose, but not quite)
    By dyoung66 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-05-2008, 11:48 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