Subtract Target Cell

pstew

New Member
Joined
Sep 9, 2015
Messages
1
Greetings,

I am trying to keep track of inventory. I have a "starting number" in the cells on column C (50 rows of data). When an "inventory number" is entered into a cell [E, G, I, K, M, O] I want a change event to occur so that the inventory number is subtracted from the starting number in the corresponding row. For example C20-E20, or C30-M30 That will give me a new starting number.
The tricky part is that later the inventory number will be deleted, but the starting number needs to stay its current value i.e. it cannot go back up because we deleted a number. That is why I was gong to do a change event. Because when my inventory number is deleted it will subtract 0 from from starting number and no harm is done.

I have tried several different things. Here is what I have so far:

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Thanks for the help
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,216,075
Messages
6,128,662
Members
449,462
Latest member
Chislobog

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