Hi Team, I was just wondering on how to sort the column data based on the condition of the cell values.
I have a input with column A, where two line formats are available. One line always starts with AA & another line always starts with 90. The line that starts with AA contains normal text whereas the line that starts with 90 contains coding and the 90 line can be maximum of 30 lines in a continuous number format like 90 01,90 02, 90 03,etc. But coding in 90 01,90 02, 90 03 refers to be continuous coding.
My concern here is line that starts with 90, always end with an "#" symbol. For example "90 01 AQWE1+AQWE2=AQWR4#"
Hence, the code which is before this "#" symbol in the above mentioned example is AQWR4 which should not be available in any of the previous 90 lines which are in the input. If this AQWR4 is deployed in any of the previous 90 line then that 90 line & the respective AA line should come below this AQWR4# line. This is how I want to get it sorted.
I have mentioned the input & expected output below. Pease help me on this.
| Input |
| AA 02 AAA |
| 90 01 ABC1+ABC2=ABC3# |
| AA 02 BBB |
| 90 01 101A=ABC1# |
| AA 02 CCC |
| 90 01 ASDF1+ASDF2+ASDF3+ |
| 90 02 ASDF4+ASDF5=ASDF9# |
| AA02 DDD |
| 90 01 201Z=ASDF4# |
| Output |
| AA 02 BBB |
| 90 01 101A=ABC1# |
| AA 02 DDD |
| 90 01 201Z=ASDF4# |
| AA 02 AAA |
| 90 01 ABC1+ABC2=ABC3# |
| AA 02 CCC |
| 90 01 ASDF1+ASDF2+ASDF3+ |
| 90 02 ASDF4+ASDF5=ASDF9# |