SilentRomance
New Member
- Joined
- Aug 4, 2021
- Messages
- 46
- Office Version
- 2016
- 2010
- Platform
- Windows
Check this code
Is there a way to shorten this codes guys?
VBA Code:
Cells(pbRowCur, 1).EntireRow.Insert xlDown
Cells(pbRowCur, 1).Formula = "=(A" & pbRowCur - 1 & ")"
Cells(pbRowCur, 3).Formula = "Sub Total"
Cells(pbRowCur, 4).Value = "=SUM(SUBTOTAL(109,D" & sumToRow + 1 & ":D" & pbRowCur - 1 & "),F" & sumToRow & ")"
Cells(pbRowCur, 5).Value = "=SUBTOTAL(109,E" & sumToRow + 1 & ":E" & pbRowCur - 1 & ")"
Cells(pbRowCur, 6).Value = "=(D" & pbRowCur & " - E" & pbRowCur & ")"
Is there a way to shorten this codes guys?