Hi there,

I need a VBA segment to generate the sum formulas into cells in column A.

The code would look at each cell in column B (from B1 to the last row with entries in row C eg

Range("b1:b" & Range("c" & Rows.Count).End(xlUp).Row).Select

If for example,

B3 contains "x" then the formula in A3 will be sum(A1:A2);

B4:B10 are all blank, therefore A4:A10 will be blank;

B11 has "x" then the formula in A11 will be sum(A4:A10)

I could do a sumif based on column B, however, data in column B would be discarded upon the completion of the report.

Thanks in advance. Can't attach the example from work