inventory check control

C

cioccofiok

This is an example inventory sheet:

A | B | C | D

1 Code | Serial N. | Description | False/true

2 0001 | 6835HF | MY RASOR | not found
3 0002 | 79632F | MY SOAP | not found
4 0003 | H8850 | MY UNDERW | not found
5
6
7
8
9
10 CHECK ITEM | (input value in A10) Formula located in A11


WHICH FORMULA I HAVE TO USE IF I DIGIT A VALUE ON CELL
A10 (EXACTELY EQUAL TO ONE OF THOSE CONTAINED ON COLUMN
B) AND HAVE AS RESULT THE CHANGE OF VALUE (I.E. from "not found" t
"found") IN COLUMN D ONLY IN THE ROW IN WHICH THE VALUE IS
CONTAINED ? and also i want to repeat the check until all values
present in stock change the status from "not found " to "found"?

My real goal is to use a barcode scanner.
What i will like to realize is a simple check of items in inventory.
The spreedsheet should be locked for modification but one cell.In thi
cell I will Input (through the barcode or manually) the item codes
Each time a code is found it should say "found" (or something similar
on the same row. Once that item is has been retrieved i input in th
same cell (the only cell modifiable) another item code. Th
spreadsheet, leaving the previous item show "found", it should retreiv
another item and if retreived show "found" in the same row of the ne
item. Sorry if i'm not that clear
english is not my language as you can realize.
Thank you for your consideration.
Cioccofiok

mANY THANKS TO BRAVEHEART PEOPL
 
F

Frank Kabel

Hi
now your problem/issue becomes clear (though you should stay in the
same thread to make the follow-up a little bit easier).
What you want to achieve can't be done by a formula. You'll need VBA
for this. To give you some ideas for one possible way; try this
1. Create a small user form with and input box for your code entry (not
sure how to integrate a barcode scanner in Excel -never done this)
2. After entring your value do a search via VBA to locate your entry in
your inventory sheet and change column D. If not found, return an error

Another way (without using a user form) would be to use the
worksheet_change event. Put the following code into your worksheet
module:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim invent_index As Integer
If Intersect(Target, Me.Range("B10")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub

With Target
If .Value <> "" Then
On Error Resume Next
invent_index = Application.WorksheetFunction.Match(.Value,
Range("A1:A8"), 0)
If invent_index = 0 Then
MsgBox "Entry not found in list"
Else
On Error GoTo CleanUp
Application.EnableEvents = False
Cells(invent_index, 4).Value = "found"
End If
End If
End With

CleanUp:
Application.EnableEvents = True
End Sub

-------
Assumptions: You data entry is cell B10 and your invesntory list in
A2:D8 (column D stores your check value)

HTH
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top