I have 100 columns and 200 rows. Each value contains "First", "Second", "King", or "Queen" concatenate with other random string and separated by _. Note: All of these are concatenated with other values. Every row has "First" once, but others can be multiple.
Below is an example:
I want to re-arrange the values of each row as per my conditions:
- "First" must always be in the first column.
- "Second" Must come after "First"
- "King" Must come after "Second"
- "Queen" Must come after "King"
Desired output:
I tried to do a for loop to iterate each row but I don't know how to switch values or replace like my requirement.