# Sort list in Excel

**URL:** <https://forum.dynamobim.com/t/sort-list-in-excel/29199>\
**Category:** Lists-Logic\
**Created:** [December 3, 2018, 9:27am UTC](https://forum.dynamobim.com/t/sort-list-in-excel/29199 "2018-12-03T09:27:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![434269](https://avatars.discourse-cdn.com/v4/letter/4/b38774/32.png) [@434269](https://forum.dynamobim.com/u/434269)\
**Post date:** [December 3, 2018, 9:27am UTC](https://forum.dynamobim.com/t/sort-list-in-excel/29199/1 "2018-12-03T09:27:28Z")

</div>

Hi!

So I’ve been trying to export data from revit to excel. but I’m having trouble filtering my list and getting a correct output in excel. So far I,ve created two lists (see the image below). List 1 consists of a total of 19 sublists. 12 sublists of walls with 33 items each, 2 sublists of floors with 28 items each, 1 roof sublist with 26 items and 4 foundation sublists with 25 items each. List 2 represents the parameter names, consisting of 33 names.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c3ddf449d77f0865ee8ce0313107a9828a671b7.png)

I would like to sort list 1 based on the input of list 2 see below. Every parameter value should be underneath the right parameter name. See the red boxes in the picture.

m2

- m2
- m2
- m2
- m2
- m2
- m2
- m2  
…

Absorptance  
- 0.1  
- 0.1  
- 0.1  
- 0.1  
- 0.1  
- 0.1  
- 0.1  
…

I,ve tried a couple of things but nothing worked. When I export the file now the image below is the result. This is without combining the lists.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![khuzaimah.ElecEng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khuzaimah.eleceng/32/92768_2.png) [@khuzaimah.ElecEng](https://forum.dynamobim.com/u/khuzaimah.ElecEng)\
**Post date:** [December 3, 2018, 9:47am UTC](https://forum.dynamobim.com/t/sort-list-in-excel/29199/2 "2018-12-03T09:47:45Z")

</div>

you should make the list of parameter exactly as the list 1, do the following :

- Flatten then Transpose List 2
- use List.Cycle on it with Level of 2
- the value for List.Cycle should be taken from List.Count from list 1 also with level 2

you should have now List 2 with same count of List 1
