+ Reply to Thread
Results 1 to 12 of 12

Table manupulations. From colum to row

  1. #1
    Registered User
    Join Date
    05-16-2015
    Location
    Nepal
    MS-Off Ver
    2010
    Posts
    12

    Post Table manupulations. From colum to row

    I have a table. part of it is shown below. These are the trip GPS cordinates for each trips by different users.

    1.PNG

    I want this to be simple, ready to use in other applications which is shown as below.

    2.PNG

    I have a huge dataset. So, I would be glad if you could help me with the automated process, probably using the code.

    Thank you

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Table manupulations. From colum to row

    Hi Ranjit,

    Welcome to the Forum

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

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

    Re: Table manupulations. From colum to row

    Quote Originally Posted by ranjit.khatri094 View Post
    I have a table. part of it is shown below. These are the trip GPS cordinates for each trips by different users.

    Attachment 395388

    I want this to be simple, ready to use in other applications which is shown as below.

    Attachment 395389

    I have a huge dataset. So, I would be glad if you could help me with the automated process, probably using the code.

    Thank you

    I am unable to view your pictures, though they aren't the best way to get help here.

    Attach a sample workbook instead. Make sure there is just enough data to demonstrate your need. Use a BEFORE sheet and an AFTER sheet in the workbook to show the process you're trying to complete or automate.

    Remember to desensitize the data if necessary.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    _________________
    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!)

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

    Re: Table manupulations. From colum to row

    I found a way to finally see your pics... so something like this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-16-2015
    Location
    Nepal
    MS-Off Ver
    2010
    Posts
    12

    Re: Table manupulations. From colum to row

    Thank you for the reply.
    Last edited by ranjit.khatri094; 05-18-2015 at 11:59 AM.

  6. #6
    Registered User
    Join Date
    05-16-2015
    Location
    Nepal
    MS-Off Ver
    2010
    Posts
    12

    Re: Table manupulations. From colum to row

    Thank you for the reply.

  7. #7
    Registered User
    Join Date
    05-16-2015
    Location
    Nepal
    MS-Off Ver
    2010
    Posts
    12

    Re: Table manupulations. From colum to row

    Thank you for the reply//

  8. #8
    Registered User
    Join Date
    05-16-2015
    Location
    Nepal
    MS-Off Ver
    2010
    Posts
    12

    Re: Table manupulations. From colum to row

    #xladept

    It was a very helpful reply, and, indeed, it solved my problem. I just wanted to ask for another small help in this solution. What should be the addition in VBA script if I wanted to display the corresponding user ID and trip ID in every row? I apologize for these question again.

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Table manupulations. From colum to row

    Hi Ranjit,

    You're welcome and thanks for the rep!

    This will put the User and Trip on every line

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    05-16-2015
    Location
    Nepal
    MS-Off Ver
    2010
    Posts
    12

    Re: Table manupulations. From colum to row

    This works perfectly well for the small files, I guess. However, when I try to run it for the whole dataset, I get some error "Runtime Error 1004-Application defined or object defined error". I would be glad if you could help me with this. (You have helped me a lot with this solution already). I am planning to do this piece by piece if there is no other way.
    :-)

    After 5 minutes: I found that there is one outlier in the table. I deleted that and now it works well. PROBLEM SOLVED
    Last edited by ranjit.khatri094; 05-19-2015 at 05:15 PM.

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

    Re: Table manupulations. From colum to row

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Table manupulations. From colum to row

    Hi Ranjit,

    All I could think was that it might be overflow and I was going to suggest that you use Jerry's code in post #4 - Glad that you found the problem

+ 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] Trying to find values from colum and row, from table array
    By B.W.B. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-15-2016, 10:09 AM
  2. Convert a mutli colum Multi roy table to a 3 column table
    By stratis63 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2015, 11:30 AM
  3. Formula Help matchin colum a with colum b to display colum c
    By dbe82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2013, 10:11 PM
  4. Copy all values in a table colum, to another sheet via VBA
    By Pho3niX90 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2011, 10:05 AM
  5. Pivot table colum width
    By LouP in forum Excel General
    Replies: 4
    Last Post: 11-27-2006, 02:55 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