Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset figure in a cell to 1 Bob Excel Discussion (Misc queries) 7 June 1st 09 10:19 PM
reset last cell in Excel The Pedagogue Excel Worksheet Functions 1 March 29th 07 09:58 AM
Set cell to record date when adjacent cell is filled AND NOT RESET The new guy Excel Worksheet Functions 3 February 26th 07 06:11 PM
Way to reset the last cell to be EOF Mary Barnich-Tampa Excel Discussion (Misc queries) 2 June 19th 06 06:02 PM
how do you reset your arrow keys to move cell to cell? Marchelle New Users to Excel 1 May 13th 05 10:37 PM


All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"