View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Formula to sum columns based on # in Cell A1

=SUM(E5:OFFSET(E5,0,MOD(MONTH(A1)-5,12)))
--
David Biddulph

"Karin" wrote in message
...
I have columns 5-16 (E:P) filled with monthly data.
Column 5 (E) contains May, column 6 (F) June, etc.
I
n Cell A1 I have the current month (7 for July, 8 for Aug, etc.). Cell A1
has the formula =now() in it and is formatted as "m" so it only shows 7
for
July, which corresponds with column 7 (G).

I want to sum cells E5 through ?5 based on the number in cell A1.
For July the sum would be E5:G5, for August it would be E5:H5, etc.)
What fomula would I use to create the sum based on the data in cell A1?
TIA!