muhittinemmi
New Member
- Joined
- Jun 20, 2023
- Messages
- 19
Hello
When new line is added in below codein line 5; The formula =IF(E5<>"";C5*E5;"") in Cell F5 and =IF(E5<>"";M5;"") in cell G5
What kind of change should be made in order to be able to add automatically according to the added line information.
When new line is added in below codein line 5; The formula =IF(E5<>"";C5*E5;"") in Cell F5 and =IF(E5<>"";M5;"") in cell G5
What kind of change should be made in order to be able to add automatically according to the added line information.
VBA Code:
Sub Ekle()
Dim i As Integer
s = Sheets("Teklif").[H65536].End(3).Row
Sheets("Teklif").Range("B" & s & ":H" & s).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
For i = 5 To s
Top = Top + (Sheets("Teklif").Range("H" & i) * Sheets("Teklif").Range("H" & i))
Next i
If Top = 0 Then Exit Sub
Sheets("Teklif").Range("H" & s + 1) = Round(Top, 2)
End Sub