+ Reply to Thread
Results 1 to 9 of 9

Group by and Transpose in Query?

Hybrid View

  1. #1
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    365
    Posts
    54

    Group by and Transpose in Query?

    Hi all,

    I'm not really familiar with the use of Queries in Excel 2016 but my attempts to get the required result by Merge and or Transpose did not succeed.

    This is data in the source_table

    T1.jpg

    What I need is a new table with
    - 1 row per CODE (1st column)
    - 1 column per CI_LOC with data from My Cust No per CODE

    The result should look like this:

    T2.jpg

    I know how to get this done by using a Pivot but would like to create a new Table instead.

    Can anybody tell me what I should do?

    * attached is the data in excelfile
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Group by and Transpose in Query?

    is that what you want?

    btw your example result is incorrect because there are different groups, diff. ci_loc & diff. cust_num
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    365
    Posts
    54

    Re: Group by and Transpose in Query?

    Hi sandy,

    Sorry for the mix-up of the data.

    Almost correct, is there a way to create only 1 line per "Code"?
    Last edited by mamaexcel; 03-08-2018 at 04:26 PM.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Group by and Transpose in Query?

    You are welcome

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)

    If you did it already - ignore it.
    Thank you.

  5. #5
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    365
    Posts
    54

    Re: Group by and Transpose in Query?

    Hi sandy,

    Oops, I made a mistake by marking my question as solved and adjusted my response just now.

  6. #6
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    365
    Posts
    54

    Re: Group by and Transpose in Query?

    I'm trying "Group By" now. Is that the way to go?

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Group by and Transpose in Query?

    If you edit query table you will see steps

    qs.jpg

  8. #8
    Registered User
    Join Date
    07-11-2017
    Location
    Edhome, where else?
    MS-Off Ver
    365
    Posts
    54

    Re: Group by and Transpose in Query?

    Hi sandy,

    I've figured it out, had to adjust the table for item 25 /57.
    Now all items are on 1 line.

    I have lots to learn about queries, but it's a great tool.

    Thanks!

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Group by and Transpose in Query?

    You are welcome

    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)

    If you did it already - ignore it.
    Thank you.

+ 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. Transpose Data using SQL query
    By lovinguy in forum Access Tables & Databases
    Replies: 1
    Last Post: 05-27-2015, 01:42 PM
  2. Transpose/group row data based on first column.
    By nasty_pastie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2014, 01:09 PM
  3. Replies: 0
    Last Post: 10-21-2014, 03:20 PM
  4. Replies: 1
    Last Post: 08-28-2014, 03:53 PM
  5. VBA Script Group transpose - Error 13
    By marcushb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 06:02 AM
  6. Pivot Table to Group and Transpose data with a common identifier
    By mscheidemann in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-25-2013, 12:56 PM
  7. Excel 2007 : vlookup and transpose query
    By breadpitt in forum Excel General
    Replies: 0
    Last Post: 06-21-2012, 06:14 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