Quote Originally Posted by davesexcel View Post
Check it out.

    Dim rw As Long
    rw = Cells(Rows.Count, "D").End(xlUp).Row
    Range("G3:G" & rw) = "=SUM(RC[-3]:RC[-1])"
    Range("D" & rw + 1 & ":G" & rw + 1).FormulaR1C1 = "=SUM(R[-" & rw - 2 & "]C:R[-1]C)"
hey ... tnx ... it's working
BUT it's working only for this scenario
this is going to be dynamic meaning i am going to have more columns and more rows with numbers so is it possible to make variable for columns also?
sometimes it will have 3x3 sometimes 5x10 ... it's not going to be fixed table
rw is looking for last row so how to make macro that will look for last used column and incorporate that in macro?