Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dear ALL,
I want a macro for following scene...plz help any body... I HAVE TWO VALUES IN CELL:A1 & CELL:A3 NOW I WANT ADD THE TWO VALUES IN THE SAME CELL A3 & IF I CHANGE THE VALUE IN A1 THEN THAT VALUE TO BEE ADDED TO A3 VALUE(MEANS A3+A1) & SAME ...... HOW IT POSSIBLE PLZ GUIDE ME. EX: A1=6,A3=3 NOW I WANT IN A3=9 IF I CHANGED IN A1(A3 HAVING 9 ONLY) MEANS NOW A1=10 THEN A3 BECOMES 9+10 MEANS A3=19.& SAME CONTNUIOUS HOW IT POSSIBLE..... -- seshu |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put the following event macro in the worksheet code area:
Private Sub Worksheet_Change(ByVal Target As Range) Set t = Target Set a1 = Range("A1") If Intersect(t, a1) Is Nothing Then Exit Sub Application.EnableEvents = False a1.Offset(2, 0).Value = a1.Offset(2, 0).Value + a1.Value Application.EnableEvents = True End Sub as you change the value in A1, it will automatically be aded to the value in A3. Because it is worksheet code, it is very easy to install and automatic to use: 1. right-click the tab name near the bottom of the Excel window 2. select View Code - this brings up a VBE window 3. paste the stuff in and close the VBE window If you have any concerns, first try it on a trial worksheet. If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn more about Event Macros (worksheet code), see: http://www.mvps.org/dmcritchie/excel/event.htm -- Gary''s Student - gsnu200909 "seshuramakrishna" wrote: Dear ALL, I want a macro for following scene...plz help any body... I HAVE TWO VALUES IN CELL:A1 & CELL:A3 NOW I WANT ADD THE TWO VALUES IN THE SAME CELL A3 & IF I CHANGE THE VALUE IN A1 THEN THAT VALUE TO BEE ADDED TO A3 VALUE(MEANS A3+A1) & SAME ...... HOW IT POSSIBLE PLZ GUIDE ME. EX: A1=6,A3=3 NOW I WANT IN A3=9 IF I CHANGED IN A1(A3 HAVING 9 ONLY) MEANS NOW A1=10 THEN A3 BECOMES 9+10 MEANS A3=19.& SAME CONTNUIOUS HOW IT POSSIBLE..... -- seshu |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
See:
http://www.mcgimpsey.com/excel/accumulator.html Note that you don't need a macro... In article , seshuramakrishna wrote: I want a macro for following scene...plz help any body... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to use an integral for cell output value. | Excel Discussion (Misc queries) | |||
how do I output result of formula to another cell? | Excel Discussion (Misc queries) | |||
How to output the left most cell? | Excel Discussion (Misc queries) | |||
How do I output the worksheet name in cell? | Excel Discussion (Misc queries) | |||
PDF output with Cell as filename | Excel Worksheet Functions |