Move active cell down and across after entry from scales

Mudsy

New Member
Joined
Feb 28, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello.

I have a barcode scanner and a set of scales that are both linked to a laptop and will input data directly to excel.
after the barcode has been entered (into A1) it automatically moves right. So far so good.
When the print button on the scale is pressed it enters the weight (into B1) but then automatically moves down (B2).
What I would like to do is have it return to A2 so I can scan the next barcode.
Any help would be greatly appreciated!

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
in the sheetmodule
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
     With Target
          If .Count > 1 Then Exit Sub                           'when you change more then 1 cell at the same time, do nothing
          If Intersect(Target, Range("1:2")) Is Nothing Then Exit Sub     'you didn't change anything in rows 1:2 = do nothing
          If .Row = 1 Then
               Application.Goto .Offset(1)                      'you changed a cell in row 1 = goto the cell below in row 2
          Else
               k = Application.Max(Cells(1, Columns.Count).End(xlToLeft).Offset(, 1).Column, Cells(2, Columns.Count).End(xlToLeft).Offset(, 1).Column)     'first free column for both row 1 and 2
               Application.Goto Cells(1, k)
          End If
     End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top