I know very well how sorted data, but I want a solution by formula