Shift Cell after enter data

This is the Excel VBA macro for me to shift from column one to column two after enter data, then from column two will switch to next row column one.

Basically column one is item code , we use bar code scanner , then column two will be number of quantity. After enter quantity , then the box will switch to next row and ready to read the next item.


Private Sub Worksheet_Change(ByVal Target As Range)

If ActiveCell.Column = 1 Then
ActiveCell.Offset(0, 1).Select
ElseIf ActiveCell.Column = 2 Then
ActiveCell.Offset(1, -1).Select
End If

End Sub




Popular posts from this blog

Microsoft Azure Backup encountered and internal error. (ID: 130001)

Fedora 19 with kernel 3.10 fail to install vmplayer module.

Boot Acronis from PXE