I have a list of columns and I want to add them together using a reference cell to determine the number of columns to the right of the first to add together.
Capture.PNG
I have managed to do this using a nested IF formula
"=IF(Q6=1,E10,IF(Q6=2,SUM(E10:F10),IF(Q6=3,SUM(E10:G10),IF(Q6=4,SUM(E10:H10),IF(Q6=5,SUM(E10:I10),IF(Q6=6,SUM(E10:J10),IF(Q6=7,SUM(E10:K10),IF(Q6=8,SUM(E10:L10),IF(Q6=9,SUM(E10:M10))))))))))"
But i wondered if there was a simpler more elegant way to perform this function rather than adding an IF function for each new column.
Something like =SUM(first column: (first column+red cell number of columns across))
Thanks in advance!
Bookmarks