Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hello. I am currently trying to create a very basic list of bulk inventory that can be easily updated.
The cell headers I have are as follows; location, item number, added or subtracted inventory, and actual inventory balance. The issue I have is that I would like to place a positive or negative integer in the added or subtracted inventory cell that would update the actual inventory balance. The other issue is that I would like the added or subtracted cell to be blank again after a number would be inputted. Any help would be greatly appreciated. Last edited by danman428 : May 12th 12 at 05:51 AM |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
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 On Sat, 12 May 2012 01:02:59 +0000, danman428 wrote: Hello. I am currently trying to create a very basic list of bulk inventory that can be easily updated. The cell headers I have are as follows; location, item number, added or subtracted inventory, and actual inventory balance. The issue I have is that I would like to place a positive or negative integer in the added or subtracted inventory cell that would update the actual inventory balance. The other issue is that I would like the added or subtracted cell to be blank again after a number would be inputted. Any help would be greatly appreciated. |
#3
![]() |
|||
|
|||
![]()
Thanks for the response and the help. You are right about not being able to track mistakes. The inventory list that I want to create is just a secondary list that is already being tracked by another system.
I appreciate your response. Thank You |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
In that case the event code posted should do the trick.
Gord On Sat, 12 May 2012 23:54:49 +0000, danman428 wrote: Thanks for the response and the help. You are right about not being able to track mistakes. The inventory list that I want to create is just a secondary list that is already being tracked by another system. I appreciate your response. Thank You |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with inventory list | Excel Discussion (Misc queries) | |||
How can i get an inventory list that adds and subtracts inventory | Excel Discussion (Misc queries) | |||
Add new inventory list to existing list | Excel Discussion (Misc queries) | |||
Add new inventory list to existing list | Excel Worksheet Functions | |||
Add new inventory list to existing list | Excel Programming |