Move row in Datatable to the top if column contains keyword

How do i move up a row to row(1) if that row contains a keyword i want in column 1?
e.g

aaa     |111|zzz
keyword |222|yyy
bbbb    |333|xxx
keyword2|444|www

to

keyword |222|yyy
keyword2|444|www
aaa     |111|zzz
bbbb    |333|xxx

the order doesn’t matter as long as the rows with keywords are at the top of the list. It can be done in data table or excel

@Zac_Soh if you have them in a data table , then Use linq query to get all the keywords that contains “Keyword”
now you have DT1 → which has all keywords text

On the main Datatable , again use linq to get all values except the Keyword
now you have DT2–> which do not have keyword text

Now merge Both using merge activity , Source will be DT2 and Destination will be DT1
Like this all words contains Keyword will be at top and remaining words at bottom

Regards

1 Like

@shanmukh_pothamsetty
Thanks for the quick reply, is there any other way beside splitting and merging? I tried merging but it messed up my format as some of the first few rows are empty, the data table comes from a pivot table