Hi
I have delveloped some codes to copy data with certain criterias but i am not getting correct sum in mentioned below codes Kindly see my attached sheet with complete codes if you people think that it needs improvement then please mention and correct it where necessory.
HTML Code:
LastRow = Range("J" & Rows.Count).End(xlUp).Row
Range("J" & LastRow + 1, "O" & LastRow + 1).Merge
Range("J" & LastRow + 1) = Header2
Range("J" & LastRow + 1, "Q" & LastRow + 1).Interior.Color = 0
Range("J" & LastRow + 1, "Q" & LastRow + 1).Font.Bold = True
Range("J" & LastRow + 1, "Q" & LastRow + 1).Font.ColorIndex = 2
Range("J" & LastRow + 1, "O" & LastRow + 1).HorizontalAlignment = xlCenter
Range("P" & LastRow + 1).Value = WorksheetFunction.Sum(Range("P" & LastRow))
thanks in advance