Inventory List

D

danman428

Hello. I am currently trying to create a very basic list of bul
inventory that can be easily updated.

The cell headers I have are as follows; location, item number, added o
subtracted inventory, and actual inventory balance. The issue I have i
that I would like to place a positive or negative integer in the adde
or subtracted inventory cell that would update the actual inventor
balance. The other issue is that I would like the added or subtracte
cell to be blank again after a number would be inputted.

Any help would be greatly appreciated
 
G

Gord Dibben

It can be done but not good practice.

How will you keep track of the numbers that are entered in the
add/subtract cell?

You will have no auditing trail available in the event of a mistake in
data entry.

Here is some code that will let you type a number, negative or
positive in any cell in Column C which is the add/subtract column.

That number will be added/subtracted to/from the balance number in
Column D then cleared from Column C

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim cRange As Range
Dim dRange As Range
Dim N As Long
N = Target.Row
Set cRange = Me.Range("C" & N)
Set dRange = Me.Range("D" & N)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 3 Then
With cRange
If .Value <> "" And IsNumeric(.Value) Then
dRange.Value = .Value + dRange.Value
End If
.ClearContents
End With
End If
enditall:
Application.EnableEvents = True
End Sub

Again I will say this leaves you with no audting trail.


Gord
 
D

danman428

Thanks for the response and the help. You are right about not being abl
to track mistakes. The inventory list that I want to create is just
secondary list that is already being tracked by another system.

I appreciate your response. Thank Yo
 

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