View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default automated cursor movement in Excel

Lets say you have 1000 records.

Sub barCode()
Dim RowCount As Long
RowCount = Round(1000/3) + 1
For i = 1 To RowCount
For j = 1 To 3
If IsEmpty(Cells(i, j)) Then
'enter the code for barcode
Else
MsgBox "Cells contain data, TERMINATE!"
Exit Sub
End If
Next j
Next i
End Sub

This should give you an idea of how to walk down the
rows three column at a whack.

"KelvinP" wrote:

Hello, I want to enter data from a bar code scanner into a spreadsheet. I
want to start entering data in cell B2, the next entry into C2, then D2.
Following the third entry I want to move down to the next row and enter data
in the same manner, B3, C3, D3, then B4, C4, D4, etc. I've tried using Target.
Offset. It works to change columns after a specified entry, but I can't seem
to get the correct VB syntax to change the active cell to the next row when
working across columns. Seems like it should be pretty simple, but I am all
thumbs when it comes to programming.