Hi guys
this code should work when I copy data from userform to sheet
when copy data from userform to sheet and fill column B should populate date in column A and should populate calculation in column H= column F* column G, but doesn't work totally , just when I write the values inside the cell from inside the sheet will be work !
can any body help please?
this code should work when I copy data from userform to sheet
when copy data from userform to sheet and fill column B should populate date in column A and should populate calculation in column H= column F* column G, but doesn't work totally , just when I write the values inside the cell from inside the sheet will be work !
can any body help please?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Target, [B:B]) Is Nothing Or Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [B:B]) Is Nothing Then
Target.Offset(, -1) = Date
Range("H2", Range("F" & Rows.Count).End(xlUp).Offset(, 2)).Formula = "=F2*G2"
Range("H2", Range("F" & Rows.Count).End(xlUp).Offset(, 2)).Value = Range("H2", Range("F" & Rows.Count).End(xlUp).Offset(, 2)).Value
End If
End Sub