dim test = {"a", "bb", "ccc", "ddd", "ee", "f", "ggg"} test1 = "" for c = 0 to test[?]-1 if length(test[c]) > length(test1) Then test1 = test[c] test2 = test1 & chr(10) else if length(test[c]) = length(test1) then test2 += test[c] & chr(10) end if next c print test2 end