View Single Post
  #1   Report Post  
confused
 
Posts: n/a
Default adding variable number of columns

Hi,

Can you add a variable number of columns?
I have a value in cell A1 which can be a number between 1 and 12.
In cell B1 I want a formula which will give:
If A1 = 1, B1 = A2
If A1 = 2, B1 = A2+B2
If A1 = 3, B1 = A2+B2+C2
If A1 = 4, B1 = A2+B2+C2+D2...etc
is there a way to say B2 = A2 plus n cells in the same row, where n is the
vvalue in cell A1?

thanks for any help you can give!
cheers