Related:
- MAKE CELL KEEP A TOTAL FROM VARY DATA
- Total war warhammer 3 free download - Download - Strategy
- Total copy - Download - File management
- Tmobile data check - Guide
- Transfer data from one excel worksheet to another automatically - Guide
- Total video converter for pc - Download - Video converters
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 8, 2010 at 07:49 AM
May 8, 2010 at 07:49 AM
Are you saying that A1 should keep on adding when ever a new value is entered in it ? So
A3 =0, -------------A1=0
A3=5, -------------A1=0+5=5
A3=20-------------A1=5+20=25
and so on ?
A3 =0, -------------A1=0
A3=5, -------------A1=0+5=5
A3=20-------------A1=5+20=25
and so on ?
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
May 8, 2010 at 08:18 AM
May 8, 2010 at 08:18 AM
Assumptions:
1. The calculation and changed cell is on same sheet
2. The note in the code has been read
Steps
1. Press ALT + F11
2. Press CTRL + R
3. Double click on the sheet where this calculation will occur
4. Paste the code
1. The calculation and changed cell is on same sheet
2. The note in the code has been read
Steps
1. Press ALT + F11
2. Press CTRL + R
3. Double click on the sheet where this calculation will occur
4. Paste the code
Dim lCurrentValue As Variant Dim bChanged As Boolean Private Sub Worksheet_Change(ByVal Target As Range) If ((bChanged = True) And (Target.Address = "$A$3")) Then ' NOTE: this check is to trap situation where the last value in the cell ' was same as current value. Remove this IF and END IF ' if that is not what is required If (Target <> lCurrentValue) Then Range("A1") = Range("A1") + Target End If End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) bChanged = (Target.Address = "$A$3") If bChanged Then lCurrentValue = Target End If End Sub
May 8, 2010 at 07:53 AM