+ Reply to Thread
Results 1 to 9 of 9

Taking a list of tasks and a list of subtasks and creating a new list with groupings

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    20

    Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Hi,

    I've spent ages trying to figure this out but my VB aren't great and I'm not really getting anywhere

    What I am trying to do is to take a list of tasks from one sheet, then take a list of sub-tasks (with references back to a task from the first list) from another sheet and create another list on the third sheet which lists all the tasks with each associated sub-task beneath each task, grouped.

    I have attached and example of what I am trying to achieve. I would be really grateful for any help on this.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Give this a try

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Hi kknb0800

    Try this code...let me know of issues.
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    05-13-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Thanks Mike and John so much for the quick responses. Both of your solutions work great!

  5. #5
    Registered User
    Join Date
    05-13-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Quote Originally Posted by jaslake View Post
    Hi kknb0800

    Try this code...let me know of issues.
    Hi John,

    Quick question...in your code, how are you linking on the Key field in the "Tasks" sheet to Task Key field in the "SubTasks" tab when copying the data over to the "Tasks and Subtasks" tab? You seem to be sorting but I don't understand how it works

    Thanks again

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Hi kknb0800

    There is no "Link"...it's all done with a Sort Routine. The Code simply copies the Data from Source Sheets "Tasks" and "SubTasks" to the Target Sheet "Tasks and SubTasks".

    The Code then sorts the data on Sheet "Tasks and SubTasks" using two keys, 1st key is Column C, 2nd key is Column A
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-13-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Thanks John for your help

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    Hi kknb0800
    You're welcome...glad I could help. Thanks for the Rep.

  9. #9
    Registered User
    Join Date
    05-13-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Taking a list of tasks and a list of subtasks and creating a new list with groupings

    In case anyone has the same problem as me, there is a slight mistake in the first solution above. I'm sure it was just a typo. The correct code is below. The only thing I changed was under the For ii = 2 To UBound(aSubTasks) loop - in the arrays, I changed i to ii:

    Please Login or Register  to view this content.
    Last edited by kknb0800; 11-06-2012 at 12:18 PM.

+ 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