View Single Post
  #1   Report Post  
Massimo
 
Posts: n/a
Default "if" formula to sum several cells...

Hi all,

I need to sum some consecutive cells in a row, depending on a number in
another cell.

For instance:
If the cell contains 2 sum A1 + B1
If the cell contains 3 sum A1 + B1 + C1
If the cell contains 4 sum A1 + B1 + C1 + D1
and so on ...

is there a function to do that or vba code needs to be written?

any help will be very much appreciated.

Thanks!
Massimo