Ok that script works when the row with the qqq has only one field missing. How can I modify the script if there are one or more fields missing for every row with qqq?
For example if I have: (i have used "a" instead of "qqq")
a b c d e f
a f g u i
a r d u
a n
So I want:
a b c d e f
a f g u , i
a r d , , u
a , , , , n
Basically I want the last character on a line that matches "a" to line up with the column that has the maximum fields.
Thanks again.