A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
This is a geometric puzzle, the way you tried would never work. But if we look at all data at once we can solve it in a simple way.
Each Wall Panel is unique, the A,B,C,D nodes are the X,Y,Z coordinates of each vertex. In your building the Y coordinate is the height => Floor.
That means after we pulled all coordinates for each Wall Panel we can determine the Start(X,Y,Z) and End(X,Y,Z) very easy because the Start is Min(X,Y,Z) and End is Max(X,Y,Z) of each node.
Now we can group all data by Start.Y to find the floors, the lowest Y is the Base, next is L2, next is L3 and so on. That way we have no limit about the number of floors.
After that we can group all data by (Start.X, End.X, Start.Z, End.Z) to find the coordinates with the same location.
The final step is to sort the data by Group and Floor descending to get the order you want.
Sample file updated, please download again.
Andreas.