Hi Everyone,
I have a macro that adds in a blank template into a table for users to fill out. This works great but the SUMIF at the bottom of the table isn't changing to take into account the increase in information.
I have attached the macro code and an example workbook.
Thanks.
Master Sheetexample.xlsm
Sub test()
Dim TemplateRng As Range, TargetCell As Range
Set TemplateRng = Sheets("Sheet1").UsedRange
Set TargetCell = Range("h1:i" & Cells(Rows.Count, "h").End(xlUp).Row).Find("Unit Tar*", , xlValues, xlPart)
If Not TemplateRng Is Nothing Then
If Not TargetCell Is Nothing Then
TemplateRng.Copy
Rows(TargetCell.Row & ":" & TargetCell.Row).Insert xlDown
End If
End If
End Sub
Bookmarks