Assuming the given data (in the image at the link below), is there a formula that I can put into D3 that will sum a given number of cells based on the value in cell D2? I can't do this with if statements because my actual data has 20 columns, and dozens of rows. (The formulas would actually be in the same row as the data, and it would be summing part of the row... and this would be repeated on each row for alternate data.)
Basically if I put 2 in I want it to sum(a6:b6), if I have 5 in D2, then I want D3 to sum(a6:e6).
I know I can figure this out easy enough with VBA, but I was wondering if there's a way to do it with a formula?
\1
Bookmarks