vba code wanted
Hi
when i enter an item in the sale report (table in shhet1), i want th same item quantity deducted form a list in sheet2 in the same workbook i have trying so far................ Could you please provide me with a vba code does this jo -- Message posted from http://www.ExcelForum.com |
vba code wanted
Hi
Sure. Rightclick the sheet tab of shhet1, choose View Code, paste this in: Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next If IsNumeric(Target.Value) Then _ Sheets("Sheet2").Range("A1").Value = _ Sheets("Sheet2").Range("A1").Value - Target.Value End Sub Now any number you enter in a cell in shhet1 will be deducted from the value in Sheet1 A1. (Note that you can't undo it.) HTH. Best wishes Harald "helmekki " skrev i melding ... Hi when i enter an item in the sale report (table in shhet1), i want the same item quantity deducted form a list in sheet2 in the same workbook i have trying so far................ Could you please provide me with a vba code does this job --- Message posted from http://www.ExcelForum.com/ |
vba code wanted
As usual, you should show us your efforts for comments. You can do this with
a worksheet_change event, finding the target on the other sheet and having the offseted value less than before by the amount entered in the target cell. -- Don Guillett SalesAid Software "helmekki " wrote in message ... Hi when i enter an item in the sale report (table in shhet1), i want the same item quantity deducted form a list in sheet2 in the same workbook i have trying so far................ Could you please provide me with a vba code does this job --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 08:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com