+ Reply to Thread
Results 1 to 8 of 8

Vertica lData

  1. #1
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Vertica lData

    Hi, I have data i need to insert into excel, it looks like as follows:

    Name: John Citizen
    Age: 27
    Occupation: Salesman
    Name: Bob Citizen
    Age: 47
    Occupation: Warehousing
    Name: James Citizen
    Age: 31
    Occupation: Real Estate
    ...etc

    and I need to insert a lot into excel in this format:

    Name Age Occupation
    John Citizen 27 Salesman
    Bob Citizen 47 Warehousing
    ...etc

    Any ideas?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,966

    Re: Vertica lData

    Here is a tutorial on how to create a data entry form that will allow you to enter data and it will appear as requested.

    https://www.myexcelonline.com/blog/c...ry-form-excel/
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Vertica lData

    yup, first idea's make your problem more clear and add a desensitized example.

    also answer
    - What version of excel you are using that helps us understand what (Advanced) functionality will work for you or not (you can add it in your profile too if you want)
    - What are you "inserting into excel? a csv file a txt file that looks like that? (add separate example of input if possible (no real names etc))
    - Do you have to do this once or periodicly (like each week or month)

    off the bat with little information
    have a look at power query, it is a great tool to convert data into desired format.

  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,824

    Re: Vertica lData

    With your data in column A, starting in A1, and with the headings in C1:E1, you can use this formula in C2:

    =SUBSTITUTE(INDEX($A:$A,INT(ROWS($1:1)-1)*3+COLUMNS($C:C)),C$1&": ","")

    Copy across into D2:E2, then copy C2:E2 down as far as you need to. The attached file illustrates this.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: Vertica lData

    Quote Originally Posted by Roel Jongman View Post
    yup, first idea's make your problem more clear and add a desensitized example.

    also answer
    - What version of excel you are using that helps us understand what (Advanced) functionality will work for you or not (you can add it in your profile too if you want)
    - What are you "inserting into excel? a csv file a txt file that looks like that? (add separate example of input if possible (no real names etc))
    - Do you have to do this once or periodicly (like each week or month)

    off the bat with little information
    have a look at power query, it is a great tool to convert data into desired format.
    Excel 2016

    It is a raw text file with data filled in vertically, exactly how I typed it out.

    I need each row; Name, Age and Occupation, as headers in 3 columns with the data filled in accordingly, basically get rid of all the repeats of Name:, Age: and Occupation:

    The Query looks like a good still, but it looks a bit beyond my skill level.

  6. #6
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Vertica lData

    In excel 2016 they renamed Power Query to "Get and Transform" (to make it sound less scary or advanced :D )and it is default available under the DAta menu.
    It is not as difficult as it sounds.. have a look at it.
    I cannot show a working solution here.. But i did find one of many tutorial pages on get and transform.
    https://datachant.com/2016/01/03/tra...-into-a-table/

    this one shows from table but the principle is the same when choosing from txt file instead

  7. #7
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: Vertica lData

    Quote Originally Posted by Pete_UK View Post
    With your data in column A, starting in A1, and with the headings in C1:E1, you can use this formula in C2:

    =SUBSTITUTE(INDEX($A:$A,INT(ROWS($1:1)-1)*3+COLUMNS($C:C)),C$1&": ","")

    Copy across into D2:E2, then copy C2:E2 down as far as you need to. The attached file illustrates this.

    Hope this helps.

    Pete
    This works perfect!

    How would I then sort from oldest first, to youngest last?

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

    Re: Vertica lData

    You should change the formula in D2 slightly by adding:

    +0

    to the end of the formula, and then copying it down - this will ensure that the age is a numeric value.

    Then you can fix the data in those columns (i.e. remove the formulae) by selecting those columns, then click < copy >, then right-click and select Paste Special | Values | OK and then < Esc >.

    Then with the data still selected, you can click on Data | Sort and choose Age as the sort column and Largest to smallest as the sort order.

    Hope this helps.

    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] Find a value based on multiple vertica values and one horizontal value
    By STUARTXL in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-20-2017, 05:47 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