Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Help with BVA code
Hi need a code that is going to work like this:
1will be use in a cell as data input 2 will affect another cell right next to it 3 will go blank after data is entered Ex.... the cell will be used to enter sold items, the number of sold items will be substracted from an existing inventory count right next to it, but then I need the cell where the sold items number was entered to go blank again..... I hope you understand my explanation, and if somebody can help me I will really apretiate it, thank you very much for reading my request... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with BVA code
On Monday, July 14, 2014 6:03:00 PM UTC-7, xxdesertorxx wrote:
Hi need a code that is going to work like this: 1will be use in a cell as data input 2 will affect another cell right next to it 3 will go blank after data is entered Ex.... the cell will be used to enter sold items, the number of sold items will be substracted from an existing inventory count right next to it, but then I need the cell where the sold items number was entered to go blank again..... I hope you understand my explanation, and if somebody can help me I will really apretiate it, thank you very much for reading my request... xxdesertorxx You could try something like this in the sheet module. Where your inventory numbers are in column B and you enter the number of sold items in column A. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub Dim sItem As Long sItem = Target Target.Offset(, 1) = Target.Offset(, 1) - sItem Target.ClearContents End Sub Regards, Howard |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with BVA code
Thanks Howard - I also stole your macro as it is a great one that can become very usefull.
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with BVA code
On Tuesday, July 15, 2014 2:01:56 AM UTC-7, Johan Snyder wrote:
Thanks Howard - I also stole your macro as it is a great one that can become very usefull. You are welcome. Please don't call it stealing, if it were stealing I'd be in jail for felony theft, given all the snippets and codes I've used from this group!<g Regards, Howard |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with BVA code
Thanks Howard - I did a whole invoicing system in the year 2000 from snippets like these and I still have small businesses that run on that very same invoicing system.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating excel file, adding code to it from code, VBE window stays | Excel Programming | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? | Excel Programming | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming |