Hello All!
I have a quite special problem here (Well at least for me).
So the basic idea would be, that you can select any cell, it will copy the current row on a new sheet. Then it would list all first other rows, which have a lower level value then i have selected. After this, it would copy all other levels, whicch have higher level value and are after the current row. So this would make a more visible hierarchy for me.
So i started with this:
ActiveSheet.Cells(activecell.Row, 1).Select
currlvl = activecell.value
So i have the current level in a variable.
And then I got stuck. Here I should make the macro run backwards and search for the first cell in the same column, which has lower value then the currlvl. Copy that row to the other sheet, change currlvl to new and move on to the next level which is lower, copy again etc. The thing is, that i have no idea, what command i should use here. for or loop or something i dont even know?
I have made a screen of original list and desired result, and I attached an excel file also with it.
reduce.jpg
reduceline.xlsx
This would help me a loooooot, could you Masters help me?
Thank you in advance,
Ambrus
Bookmarks