![]() |
how to reset a value in a cell after another
hello, i'm new here and i want some help from you guys. hope you'll help me
with this.. i want to create program in excel just like inventory of item sales. example product Name ------------------ name of product quantity:____ ----------------- quantity of the item sold will be input here (i.e. 1) total amount:_____------------------- number inputted in quantity will multiply by the fix retail price of prodcuct will be shown here. I want to make a program like this---- after the amount is shown in the Total amount Cell, I want the cell in a quantity where I input a number will be reset to zero so I can input another quantity, but the new number that i will input will be added to the previous number. Hope you help me guysss.. more power. |
how to reset a value in a cell after another
Here is a link to using a cell to accumulate totals. It also explains the
pitfall of doing this. http://www.mcgimpsey.com/excel/accumulator.html Mike F "Mondy" wrote in message ... hello, i'm new here and i want some help from you guys. hope you'll help me with this.. i want to create program in excel just like inventory of item sales. example product Name ------------------ name of product quantity:____ ----------------- quantity of the item sold will be input here (i.e. 1) total amount:_____------------------- number inputted in quantity will multiply by the fix retail price of prodcuct will be shown here. I want to make a program like this---- after the amount is shown in the Total amount Cell, I want the cell in a quantity where I input a number will be reset to zero so I can input another quantity, but the new number that i will input will be added to the previous number. Hope you help me guysss.. more power. |
how to reset a value in a cell after another
I have modified the two-cell accumulator method from the linked site to
match what you want. Note: change "A1" to where your unit quantity is change "A2" to where the cumulative total is change "B1" to where the retail price is or substitute the price for 'Range("B1").Value' to hard code the number in the code Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Address(False, False) = "A1" Then 'change "A1" to where your unit quantity is If IsNumeric(.Value) Then Application.EnableEvents = False Range("A2").Value = Range("A2").Value + (.Value * Range("B1").Value) 'change "A2" & "B1" .Value = 0 Application.EnableEvents = True End If End If End With End Sub "Mike Fogleman" wrote in message ... Here is a link to using a cell to accumulate totals. It also explains the pitfall of doing this. http://www.mcgimpsey.com/excel/accumulator.html Mike F "Mondy" wrote in message ... hello, i'm new here and i want some help from you guys. hope you'll help me with this.. i want to create program in excel just like inventory of item sales. example product Name ------------------ name of product quantity:____ ----------------- quantity of the item sold will be input here (i.e. 1) total amount:_____------------------- number inputted in quantity will multiply by the fix retail price of prodcuct will be shown here. I want to make a program like this---- after the amount is shown in the Total amount Cell, I want the cell in a quantity where I input a number will be reset to zero so I can input another quantity, but the new number that i will input will be added to the previous number. Hope you help me guysss.. more power. |
how to reset a value in a cell after another
Hi again..
thanks for the code. but I have a question where did i put the code? as I said before I'm newbie and i dont know how to use visual basic together with excel.. thanks again... "Mike Fogleman" wrote: I have modified the two-cell accumulator method from the linked site to match what you want. Note: change "A1" to where your unit quantity is change "A2" to where the cumulative total is change "B1" to where the retail price is or substitute the price for 'Range("B1").Value' to hard code the number in the code Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Address(False, False) = "A1" Then 'change "A1" to where your unit quantity is If IsNumeric(.Value) Then Application.EnableEvents = False Range("A2").Value = Range("A2").Value + (.Value * Range("B1").Value) 'change "A2" & "B1" .Value = 0 Application.EnableEvents = True End If End If End With End Sub "Mike Fogleman" wrote in message ... Here is a link to using a cell to accumulate totals. It also explains the pitfall of doing this. http://www.mcgimpsey.com/excel/accumulator.html Mike F "Mondy" wrote in message ... hello, i'm new here and i want some help from you guys. hope you'll help me with this.. i want to create program in excel just like inventory of item sales. example product Name ------------------ name of product quantity:____ ----------------- quantity of the item sold will be input here (i.e. 1) total amount:_____------------------- number inputted in quantity will multiply by the fix retail price of prodcuct will be shown here. I want to make a program like this---- after the amount is shown in the Total amount Cell, I want the cell in a quantity where I input a number will be reset to zero so I can input another quantity, but the new number that i will input will be added to the previous number. Hope you help me guysss.. more power. |
how to reset a value in a cell after another
1) RightClick on the tab of the sheet where you need your accumulator
2) Click 'View Code' 3) Paste "mondy" wrote in message ... Hi again.. thanks for the code. but I have a question where did i put the code? as I said before I'm newbie and i dont know how to use visual basic together with excel.. thanks again... "Mike Fogleman" wrote: I have modified the two-cell accumulator method from the linked site to match what you want. Note: change "A1" to where your unit quantity is change "A2" to where the cumulative total is change "B1" to where the retail price is or substitute the price for 'Range("B1").Value' to hard code the number in the code Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Address(False, False) = "A1" Then 'change "A1" to where your unit quantity is If IsNumeric(.Value) Then Application.EnableEvents = False Range("A2").Value = Range("A2").Value + (.Value * Range("B1").Value) 'change "A2" & "B1" .Value = 0 Application.EnableEvents = True End If End If End With End Sub "Mike Fogleman" wrote in message ... Here is a link to using a cell to accumulate totals. It also explains the pitfall of doing this. http://www.mcgimpsey.com/excel/accumulator.html Mike F "Mondy" wrote in message ... hello, i'm new here and i want some help from you guys. hope you'll help me with this.. i want to create program in excel just like inventory of item sales. example product Name ------------------ name of product quantity:____ ----------------- quantity of the item sold will be input here (i.e. 1) total amount:_____------------------- number inputted in quantity will multiply by the fix retail price of prodcuct will be shown here. I want to make a program like this---- after the amount is shown in the Total amount Cell, I want the cell in a quantity where I input a number will be reset to zero so I can input another quantity, but the new number that i will input will be added to the previous number. Hope you help me guysss.. more power. |
how to reset a value in a cell after another
Hi again...i get it i used to right click the tab and i inserted the code
the problem is when i run the program it ask for a macro name, if i put name and run it again it displays error... "Steve" wrote: 1) RightClick on the tab of the sheet where you need your accumulator 2) Click 'View Code' 3) Paste "mondy" wrote in message ... Hi again.. thanks for the code. but I have a question where did i put the code? as I said before I'm newbie and i dont know how to use visual basic together with excel.. thanks again... "Mike Fogleman" wrote: I have modified the two-cell accumulator method from the linked site to match what you want. Note: change "A1" to where your unit quantity is change "A2" to where the cumulative total is change "B1" to where the retail price is or substitute the price for 'Range("B1").Value' to hard code the number in the code Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Address(False, False) = "A1" Then 'change "A1" to where your unit quantity is If IsNumeric(.Value) Then Application.EnableEvents = False Range("A2").Value = Range("A2").Value + (.Value * Range("B1").Value) 'change "A2" & "B1" .Value = 0 Application.EnableEvents = True End If End If End With End Sub "Mike Fogleman" wrote in message ... Here is a link to using a cell to accumulate totals. It also explains the pitfall of doing this. http://www.mcgimpsey.com/excel/accumulator.html Mike F "Mondy" wrote in message ... hello, i'm new here and i want some help from you guys. hope you'll help me with this.. i want to create program in excel just like inventory of item sales. example product Name ------------------ name of product quantity:____ ----------------- quantity of the item sold will be input here (i.e. 1) total amount:_____------------------- number inputted in quantity will multiply by the fix retail price of prodcuct will be shown here. I want to make a program like this---- after the amount is shown in the Total amount Cell, I want the cell in a quantity where I input a number will be reset to zero so I can input another quantity, but the new number that i will input will be added to the previous number. Hope you help me guysss.. more power. |
All times are GMT +1. The time now is 06:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com