[/CODE]
I am working on a project which requires to fill the data in specific way. After filling the 3 values in Col3, i should fill the data in Col4. After that i will start filling the data in the Col1 with new row and so on
Please check the following code.
Thank you.
I am working on a project which requires to fill the data in specific way. After filling the 3 values in Col3, i should fill the data in Col4. After that i will start filling the data in the Col1 with new row and so on
Please check the following code.
Thank you.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim tAd As Variant
tAd = Split(Target.Address, "$")
Dim rowRemainder As Long
rowRemainder = tAd(2) Mod 3
If tAd(1) = "A" Then
Range("B" & Target.Row).Activate
ElseIf tAd(1) = "B" Then
Range("C" & Target.Row).Activate
ElseIf tAd(1) = "C" Then
Range("D" & Target.Row).Activate
ElseIf tAd(1) = "D" Then
If rowRemainder = 1 Then
Range("A" & Target.Row + 1).Activate
Else
Range("D" & Target.Row + 1).Activate
End If
End If
End Sub