Building a To-Do List: How to insert rows based on dynamic data?

New Contributor

I'm really sorry if this has been answered before or there's an easy solution. I've looked and found nothing that quite helped me. I'm a newbie and very grateful for any help.


My problem isn't that complicated:
I have a sheet with projects that all have individual IDs, and another sheet with tasks that have also have individual Task-ID's and the ID of the project they belong to. There are some tasks belonging to a project.

 The project sheetThe project sheetThe task sheetThe task sheetThe wanted resultThe wanted result

What I want to do is automatically sorting the tasks under the project they belong to, similar to a normal to-do list. Again, any help would be appreciated.


I think VLOOKUP could be of use here, but honestly I'm not experienced enough to sort this out.

3 Replies

Hi @helloriemer


Would you be able to attach a sample file.  That would be helpful in assisting you.


From the sounds of it you need to bring the Project Name into the sheet with Tasks (using VLOOKUP or similar) and then convert that to a Pivot Table in order to automatically group and sort the tasks


If you can attach an example I can mock up a solution


Thank you a lot for the help. Attached is a test file.


Attached is a file with 2 approaches


1st is a pivot table which is simpler but is based purely on the Task list,  therefore if a project has no tasks (e.g. project A) then it doesn't show in the Pivot Table


2nd is using Power Query.  If you have Excel 2016 it should work, this combines the two tables and therefore projects with no tasks are included