PC Review


Reply
Thread Tools Rate Thread

Barcode scanner and quantities

 
 
Brian
Guest
Posts: n/a
 
      8th Dec 2008
I have a simple spreadsheet that has a list of inventory items, and once per
week someone needs to go through the warehouse and count these items. I
assigned a part number and printed barcode labels for each of these items.
In the spreadsheet, column A includes the written name of the part and column
C has the part # which is on the barcode label, and then column D includes
the quantity, which needs to be filled in.

What I'd like to be able to do is be able to scan the labels and have the
correct row in column D (the quantity column) be selected to match that
item....so it would be automatic....scan the label, then type in the
quantity.

What's the best way to go about that?
 
Reply With Quote
 
 
 
 
Stefi
Guest
Posts: n/a
 
      9th Dec 2008

You should install this event sub in your workbook(s):
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then Range("D" & Target.Row).Select
End Sub

Post if you need help to install it!

Regards,
Stefi


„Brian” ezt *rta:

> I have a simple spreadsheet that has a list of inventory items, and once per
> week someone needs to go through the warehouse and count these items. I
> assigned a part number and printed barcode labels for each of these items.
> In the spreadsheet, column A includes the written name of the part and column
> C has the part # which is on the barcode label, and then column D includes
> the quantity, which needs to be filled in.
>
> What I'd like to be able to do is be able to scan the labels and have the
> correct row in column D (the quantity column) be selected to match that
> item....so it would be automatic....scan the label, then type in the
> quantity.
>
> What's the best way to go about that?

 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      9th Dec 2008

It looks like I could use a little help on this--I have a book on VBA but I'm
just getting started on it. I'm using Excel 2007, by the way.

OK, so here's what I'm looking at. I right-click on the correct worksheet
tab at the bottom, and then View Code? Then do I just paste that code in
there? Does it matter if I'm in General or Worksheet? I tried it both
ways....but all I'm getting is what it did before....that my scanner inputs
the barcode info in whatever cell is highlighted.

Just to be sure I'm clear....what I want to do is scan, and then have Excel
say "OK, that barcode info matches the info that's in cell C17, so select D17
so the user can input the quantity".

"Stefi" wrote:

> You should install this event sub in your workbook(s):
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Column = 3 Then Range("D" & Target.Row).Select
> End Sub
>
> Post if you need help to install it!
>
> Regards,
> Stefi
>
>
> „Brian” ezt *rta:
>
> > I have a simple spreadsheet that has a list of inventory items, and once per
> > week someone needs to go through the warehouse and count these items. I
> > assigned a part number and printed barcode labels for each of these items.
> > In the spreadsheet, column A includes the written name of the part and column
> > C has the part # which is on the barcode label, and then column D includes
> > the quantity, which needs to be filled in.
> >
> > What I'd like to be able to do is be able to scan the labels and have the
> > correct row in column D (the quantity column) be selected to match that
> > item....so it would be automatic....scan the label, then type in the
> > quantity.
> >
> > What's the best way to go about that?

 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      10th Dec 2008

> OK, so here's what I'm looking at. I right-click on the correct worksheet
> tab at the bottom, and then View Code? YES!



Then do I just paste that code in
> there? YES!


Does it matter if I'm in General or Worksheet? NO!

I tried it both
> ways....but all I'm getting is what it did before....that my scanner inputs
> the barcode info in whatever cell is highlighted.
>
> Just to be sure I'm clear....what I want to do is scan, and then have Excel
> say "OK, that barcode info matches the info that's in cell C17, so select D17
> so the user can input the quantity".


Scanner shall input the barcode info in whatever cell is highlighted, so you
have to position to the first free cell in column C manually before starting
scanning. Then this event sub selects the adjacent cell in column D waiting
for inputting the quantity, then selects cell in the next row in column C
waiting for scanning the next barcode.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Then Range("D" & Target.Row).Select
If Target.Column = 4 Then Range("C" & Target.Row + 1).Select
End Sub


Regards.
Stefi

 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      10th Dec 2008
I tried it again, and here's what I have happening. My list of inventory
parts is 88 rows long, so my first open C cell (C is where the part # list
is) is C89. I put the cursor in cell C89 and scan a barcode. It then enters
the barcode info that was scanned in cell C89 and then highlights cell D89.
Is that they way it's supposed to work, or did I do it wrong?


What I'm hoping to have happen is this.....the barcode I'm testing matches
the information that's in row 27. I'm wondering if I can scan this barcode
and have the code realize that it matches C27, so I want the cursor placed in
D27 where the quantity should go.

I'm vaguely familiar with VB code....it seems that the code is saying "if
the cursor is in column C, go to column D of the same row. If the cursor is
in column D, go to column C of the next row".

Based on my interpretation of the code, also seems to match what it's doing.
If I put the cursor in D90, it inputs the barcode in D90 and then selects
C91.


"Stefi" wrote:

>
> > OK, so here's what I'm looking at. I right-click on the correct worksheet
> > tab at the bottom, and then View Code? YES!

>
>
> Then do I just paste that code in
> > there? YES!

>
> Does it matter if I'm in General or Worksheet? NO!
>
> I tried it both
> > ways....but all I'm getting is what it did before....that my scanner inputs
> > the barcode info in whatever cell is highlighted.
> >
> > Just to be sure I'm clear....what I want to do is scan, and then have Excel
> > say "OK, that barcode info matches the info that's in cell C17, so select D17
> > so the user can input the quantity".

>
> Scanner shall input the barcode info in whatever cell is highlighted, so you
> have to position to the first free cell in column C manually before starting
> scanning. Then this event sub selects the adjacent cell in column D waiting
> for inputting the quantity, then selects cell in the next row in column C
> waiting for scanning the next barcode.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Column = 3 Then Range("D" & Target.Row).Select
> If Target.Column = 4 Then Range("C" & Target.Row + 1).Select
> End Sub
>
>
> Regards.
> Stefi
>

 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      12th Dec 2008
You read the code right, I misunderstood the task. I still don't understand
it perfectly, this piece of code does what I've understood:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "C89" Then 'change C89 to cell
reference where you want to input barcode
If Target.Value = Range("C27").Value Then
Range("D27").Select
Else
MsgBox "barcode doesn't match cell C27!"
End If
End If
End Sub

It expects a barcode inputted in cell C89, doesn't do anything if input is
made in any other cell.
If barcode in cell C89 matches the value of cell C27 then it selects D27 for
inputting quantity.

Please, clarify the task in more details, possibly illustrated with an
example, if this still is not what you need!

Regards,
Stefi


„Brian” ezt *rta:

> I tried it again, and here's what I have happening. My list of inventory
> parts is 88 rows long, so my first open C cell (C is where the part # list
> is) is C89. I put the cursor in cell C89 and scan a barcode. It then enters
> the barcode info that was scanned in cell C89 and then highlights cell D89.
> Is that they way it's supposed to work, or did I do it wrong?
>
>
> What I'm hoping to have happen is this.....the barcode I'm testing matches
> the information that's in row 27. I'm wondering if I can scan this barcode
> and have the code realize that it matches C27, so I want the cursor placed in
> D27 where the quantity should go.
>
> I'm vaguely familiar with VB code....it seems that the code is saying "if
> the cursor is in column C, go to column D of the same row. If the cursor is
> in column D, go to column C of the next row".
>
> Based on my interpretation of the code, also seems to match what it's doing.
> If I put the cursor in D90, it inputs the barcode in D90 and then selects
> C91.
>
>
> "Stefi" wrote:
>
> >
> > > OK, so here's what I'm looking at. I right-click on the correct worksheet
> > > tab at the bottom, and then View Code? YES!

> >
> >
> > Then do I just paste that code in
> > > there? YES!

> >
> > Does it matter if I'm in General or Worksheet? NO!
> >
> > I tried it both
> > > ways....but all I'm getting is what it did before....that my scanner inputs
> > > the barcode info in whatever cell is highlighted.
> > >
> > > Just to be sure I'm clear....what I want to do is scan, and then have Excel
> > > say "OK, that barcode info matches the info that's in cell C17, so select D17
> > > so the user can input the quantity".

> >
> > Scanner shall input the barcode info in whatever cell is highlighted, so you
> > have to position to the first free cell in column C manually before starting
> > scanning. Then this event sub selects the adjacent cell in column D waiting
> > for inputting the quantity, then selects cell in the next row in column C
> > waiting for scanning the next barcode.
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > If Target.Column = 3 Then Range("D" & Target.Row).Select
> > If Target.Column = 4 Then Range("C" & Target.Row + 1).Select
> > End Sub
> >
> >
> > Regards.
> > Stefi
> >

 
Reply With Quote
 
william bill
Guest
Posts: n/a
 
      27th Nov 2010
thanks a a lot, i had a similar issue and your tip solved it!

> On Monday, December 08, 2008 4:31 PM Bria wrote:


> I have a simple spreadsheet that has a list of inventory items, and once per
> week someone needs to go through the warehouse and count these items. I
> assigned a part number and printed barcode labels for each of these items.
> In the spreadsheet, column A includes the written name of the part and column
> C has the part # which is on the barcode label, and then column D includes
> the quantity, which needs to be filled in.
>
> What I'd like to be able to do is be able to scan the labels and have the
> correct row in column D (the quantity column) be selected to match that
> item....so it would be automatic....scan the label, then type in the
> quantity.
>
> What's the best way to go about that?



>> On Tuesday, December 09, 2008 5:44 AM Stef wrote:


>> You should install this event sub in your workbook(s):
>> Private Sub Worksheet_Change(ByVal Target As Range)
>> If Target.Column = 3 Then Range("D" & Target.Row).Select
>> End Sub
>>
>> Post if you need help to install it!
>>
>> Regards,
>> Stefi
>>
>>
>> ???Brian??? ezt ??rta:



>>> On Tuesday, December 09, 2008 11:42 AM Bria wrote:


>>> It looks like I could use a little help on this--I have a book on VBA but I'm
>>> just getting started on it. I'm using Excel 2007, by the way.
>>>
>>> OK, so here's what I'm looking at. I right-click on the correct worksheet
>>> tab at the bottom, and then View Code? Then do I just paste that code in
>>> there? Does it matter if I'm in General or Worksheet? I tried it both
>>> ways....but all I'm getting is what it did before....that my scanner inputs
>>> the barcode info in whatever cell is highlighted.
>>>
>>> Just to be sure I'm clear....what I want to do is scan, and then have Excel
>>> say "OK, that barcode info matches the info that's in cell C17, so select D17
>>> so the user can input the quantity".
>>>
>>> "Stefi" wrote:



>>>> On Wednesday, December 10, 2008 6:38 AM Stef wrote:


>>>> Then do I just paste that code in
>>>>
>>>> Does it matter if I'm in General or Worksheet? NO!
>>>>
>>>> I tried it both
>>>>
>>>> Scanner shall input the barcode info in whatever cell is highlighted, so you
>>>> have to position to the first free cell in column C manually before starting
>>>> scanning. Then this event sub selects the adjacent cell in column D waiting
>>>> for inputting the quantity, then selects cell in the next row in column C
>>>> waiting for scanning the next barcode.
>>>>
>>>> Private Sub Worksheet_Change(ByVal Target As Range)
>>>> If Target.Column = 3 Then Range("D" & Target.Row).Select
>>>> If Target.Column = 4 Then Range("C" & Target.Row + 1).Select
>>>> End Sub
>>>>
>>>>
>>>> Regards.
>>>> Stefi



>>>>> On Wednesday, December 10, 2008 2:04 PM Bria wrote:


>>>>> I tried it again, and here's what I have happening. My list of inventory
>>>>> parts is 88 rows long, so my first open C cell (C is where the part # list
>>>>> is) is C89. I put the cursor in cell C89 and scan a barcode. It then enters
>>>>> the barcode info that was scanned in cell C89 and then highlights cell D89.
>>>>> Is that they way it's supposed to work, or did I do it wrong?
>>>>>
>>>>>
>>>>> What I'm hoping to have happen is this.....the barcode I'm testing matches
>>>>> the information that's in row 27. I'm wondering if I can scan this barcode
>>>>> and have the code realize that it matches C27, so I want the cursor placed in
>>>>> D27 where the quantity should go.
>>>>>
>>>>> I'm vaguely familiar with VB code....it seems that the code is saying "if
>>>>> the cursor is in column C, go to column D of the same row. If the cursor is
>>>>> in column D, go to column C of the next row".
>>>>>
>>>>> Based on my interpretation of the code, also seems to match what it's doing.
>>>>> If I put the cursor in D90, it inputs the barcode in D90 and then selects
>>>>> C91.
>>>>>
>>>>>
>>>>> "Stefi" wrote:



>>>>>> On Friday, December 12, 2008 8:17 AM Stef wrote:


>>>>>> You read the code right, I misunderstood the task. I still don't understand
>>>>>> it perfectly, this piece of code does what I've understood:
>>>>>>
>>>>>> Private Sub Worksheet_Change(ByVal Target As Range)
>>>>>> If Target.Address(False, False) = "C89" Then 'change C89 to cell
>>>>>> reference where you want to input barcode
>>>>>> If Target.Value = Range("C27").Value Then
>>>>>> Range("D27").Select
>>>>>> Else
>>>>>> MsgBox "barcode doesn't match cell C27!"
>>>>>> End If
>>>>>> End If
>>>>>> End Sub
>>>>>>
>>>>>> It expects a barcode inputted in cell C89, doesn't do anything if input is
>>>>>> made in any other cell.
>>>>>> If barcode in cell C89 matches the value of cell C27 then it selects D27 for
>>>>>> inputting quantity.
>>>>>>
>>>>>> Please, clarify the task in more details, possibly illustrated with an
>>>>>> example, if this still is not what you need!
>>>>>>
>>>>>> Regards,
>>>>>> Stefi
>>>>>>
>>>>>>
>>>>>> ???Brian??? ezt ??rta:



>>>>>> Submitted via EggHeadCafe
>>>>>> HTML5 And the Case of the Missing Browsers
>>>>>> http://www.eggheadcafe.com/tutorials...-browsers.aspx

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Barcode Scanner Greg B Microsoft Excel Programming 1 4th Jul 2009 03:10 AM
Barcode Scanner and RDP? skylark Windows XP Embedded 0 24th Jul 2008 02:06 PM
ASP.Net and Barcode Scanner chris_gpf1@hotmail.com Microsoft ASP .NET 2 27th Jul 2007 04:45 PM
Barcode scanner ChadMan Microsoft Access 4 21st Sep 2005 10:01 PM
Help with a barcode scanner ? YEL-MEL Microsoft Excel Misc 1 12th Nov 2003 09:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:05 AM.