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... |
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 |
Help with BVA code
Thanks Howard - I also stole your macro as it is a great one that can become very usefull.
|
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 |
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.
|
All times are GMT +1. The time now is 07:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com