Need help to make formula not to appear in cells
Actually with actual macro formula is appearing
Actually with actual macro formula is appearing
Code:
Sub RAM()
Dim LastR As Long
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Sheets("data")
Set ws2 = Sheets("summary")
LastR = ws1.Cells(Rows.Count, 1).End(xlUp).Row
ws2.Range("A1:E1").Value = ws1.Range("A1:E1").Value
ws2.Range(ws2.Range("A2"), ws2.Cells(LastR, 4)).Value = ws1.Range(ws1.Range("A2"), ws1.Cells(LastR, 4)).Value
ws2.Range(ws2.Range("A2"), ws2.Cells(LastR, 4)).RemoveDuplicates Columns:=Array(1, 2, 3, 4), Header:=xlNo
ws2.Range(ws2.Range("E2"), ws2.Cells(ws2.Cells(Rows.Count, 1).End(xlUp).Row, 5)).Value = _
"=SUMIFS(data!C,data!C[-4],RC[-4],data!C[-3],RC[-3],data!C[-2],RC[-2],data!C[-1],RC[-1])"
End Sub