View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Costas Limassol[_2_] Costas Limassol[_2_] is offline
external usenet poster
 
Posts: 13
Default Conditional/variable sum??

Hi, I am trying to sum the sales values of months (say Jan to Mar) with the
start month being fixed and the end month being a variable. I have therefore
named a cell as my EndMonth and want my sum to change automatically every
time I change my EndMonth variable. ie. if the sales values for Jan to Dec
are in range B2 to M2, I want my sum to change automatically from B2:D2 for
the period Jan to Mar to B2:G2 for the period Jan to Jun.

Is there a function for this? I tried Index for no luck.