if formula
You can use choose
sum(a1,a5,a5:b5,a5:c5,a5:d5,a5:e5,a5:f5,a5:g5,a5:h 5,a5:i5,a5:j5,a5:k5,a5:l5))
a1 is an index and will choose a differnt range of cell depending if the
number in a1 is from 1 to 12
"Rechie" wrote:
I have a worksheet with 13 columns (Column A to M) for all the months of
year plus the accumulated or Year to date total column. A formula should add
the accumulated for each month of the year in the 13th column. Example if I
input "3" in cell A1 it should automatically sum at cell M2 all three cells
for months of Jan, Feb and March or (A2,B2,C2) and if I entred "5" for months
of Jan to May and etc.
As example below if I entered "3" in cell A1, the accumulated column should
show "35". Calculated 10+15+10 for jan,feb and march figures.
A B C D .... L M
"3"
Jan Feb Mar Apr... Dec Total Accumulated/YTD
10 15 10 20 ... 12 = 35
Appreciate for your help!
|