I currently have 12 columns, so I want to loop through each column, take the highest value from the previous columns, and apply it to the current column.
For example, if column 1 > column 2 then column 2 = column 1 else no change. I want the same to apply for column 3, 4 and so on.
I want to be able to achieve this with loops, if possible.
As it stands, its hard for me to envision what you’re trying to accomplish. You start out by talking about columns, then switch to individual rows in each column, then you switch back to columns.
It’s also unclear to me whether you want this comparison to happen between all columns, or just in order from 1 to 12, or pairwise.
I think it would be best if you provided some example data as well as an example of your desired output.