+ Reply to Thread
Results 1 to 19 of 19

Grouping information into one Row

  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Grouping information into one Row

    I have a Query called Jobs, which only shows ACTIVE Jobs.
    This is linked to a Query called Job Operations. The Work Centers field from Job Operations table are only shown if the status is not Completed.
    Every Job can have many Wokr Centers to be Completed.
    I need to see all the jobs listed, then for each job list all the Work Center remaining to be completed, but on just one row and not.have the job repeated for each Work Center that is not completed.Example:
    Job # Work Center
    123456 CNC/MILL/DRILL/PACK/SHIP

  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: Grouping information into one Row

    There's a workbook for us to look at that goes with this question?

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    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
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    Please see the attached workbook. For example: Job # 1000 has 5 Work Centers, hi-lighted in Red, (SawCut-CNC Lathe-Deburr-Assemble-Inspect). I need to have Job # 1000 only listed once, in a row, and the Open Work Centers of (SawCut-CNC Lathe-Deburr-Assemble-Inspect) be shown. I hope this makes sense, and THANK YOU for any advise.
    Attached Files Attached Files

  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: Grouping information into one Row

    My apologies...this is an ACCESS question?

    I can offer you an Excel solution, a macro to fix the data. Would that be OK?

  5. #5
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    No need for an Apology. Are you indicating that Excel is unable to do this, and it is really better suited by Access?

    I'm very open to an Excel Solution for the work book, please feel free to send your thoughts and advise.

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

    Re: Grouping information into one Row

    No, this is the ACCESS forum. That's what threw me. If this is an Excel question for sure, I can offer you a macro to accomplish your reformatting.

  7. #7
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    My apologies - I meant to asked the question in the excel forum and entered it in the access instead. Please your macro would be much appreciatted.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Grouping information into one Row

    Thread moved.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Grouping information into one Row

    I'll ask a moderator to move this for you. Be sure to use the USERCP link at the top of the forum to see all your open threads, in case your link to this thread stops working.

    I can write a quick macro to merge the items in column J for matching column A entries. You want the data reduced to one line per column A value? That's fine for job 1000, all the cells in other columns are the same.

    But what about Job 1100? The values in F, G, H and I are all different. What then? Job 1200, too, and Job 13035.

  10. #10
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    All Jobs need to have the same macro as in Job 1000. So all Jobs need to be listed just once in a ROW, with the Column J for a matching column A. The information in column J for each row needs to list those Work Centers in Sequence Order (with ) being the lowest and being ascending. I have update a new Work Sheet as an example.
    I hope this makes sense.
    Attached Files Attached Files

  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: Grouping information into one Row

    You don't seem to understand my questions, and you provided more data with no example results.

    Oh well, you can try this and see if it's what you're after:
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    Here is a sample with detailed information.
    Attached Files Attached Files

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

    Re: Grouping information into one Row

    Another:
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    I inserted the code into a Macro and ran.
    Run time error: '4004;
    AutoFileter method or Range class failed.
    I clicked debug and this line failed......Range("C:C").AutoFilter Field:=1, Criteria1:="="

    Any thoughts?

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

    Re: Grouping information into one Row

    Here's your sheet back, I've run it on this wb twice...takes about 90 seconds but it works.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    Thanks, not sure why it exhibits the ....Runtime error 1004, AutoFilter method of Range class failed.... , on my WB though.

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

    Re: Grouping information into one Row

    Is it a different wb than the one you posted? If it's still doing that, then post it up, I'll take a look.

  18. #18
    Registered User
    Join Date
    04-19-2010
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Grouping information into one Row

    I used the WB that you uploaded too and the same error is shown.

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

    Re: Grouping information into one Row

    How very odd. Since it's working for me, and it's a technique I use frequently...not sure what to offer next.

    Maybe END the macro at that line where it fails.
    Turn on your macro recorder
    Let it record YOU filtering column C by "blanks"
    Turn off recorder and examine the code created. Is it significantly different than the line I gave you?

    Post the resulting code here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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