Try this:
1) Enter amounts into the "Good Received" or "Goods Issued" fields
2) Columns F:J and N:S will be populated with quantities and todays date
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim rng As Range
Dim r1 As Long
'###### For Goods Received...
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Value = "" Then Exit Sub 'If cell is blank, then exit sub...
r1 = Target.Row
Set rng = Range(Cells(r1, 6), Cells(r1, 11)) 'Cells to enter received...
For Each cell In rng
If cell.Value = "" Then
Cells(r1, cell.Column).Value = Target.Value
Cells(r1, cell.Column).Offset(-1, 0).Value = Date
Exit For
End If
Next cell
End If
'###### For Goods Issued...
If Not Intersect(Target, Range("B:B")) Is Nothing Then
If Target.Value = "" Then Exit Sub 'If cell is blank, then exit sub...
r1 = Target.Row
Set rng = Range(Cells(r1, 14), Cells(r1, 19)) 'Cells to enter received...
For Each cell In rng
If cell.Value = "" Then
Cells(r1, cell.Column).Value = Target.Value
Cells(r1, cell.Column).Offset(-1, 0).Value = Date
Exit For
End If
Next cell
End If
End Sub
Bookmarks