LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default Accumulator cells

Hi all,
Is there a way to modify this code so that it applies to all rows instead of
just the indicated rows? For example....adding a value in D3 will be added to
F3...values added in D10 will be added to F10...and so on....in other words,
I'd like it to apply to the entire columns.

Thanks!

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = ("D3") Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
Range("F3").Value = Range("F3").Value + .Value
Application.EnableEvents = True
End If
End If
End With
With Target
If .Address(False, False) = "C3" Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
Range("F3").Value = Range("F3").Value - .Value
Application.EnableEvents = True
End If
End If
End With
End Sub
 
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
Accumulator BadBoy Excel Worksheet Functions 2 April 24th 09 12:25 PM
accumulator with other than one dan Excel Worksheet Functions 8 November 24th 06 06:29 PM
Adding an accumulator for multiple cells jrambo63 Excel Worksheet Functions 3 May 26th 05 05:50 PM
Please help fix my accumulator Tim McMahon Excel Programming 3 May 23rd 04 09:06 PM
Please help me get this accumulator working Bill Craig[_3_] Excel Programming 1 May 19th 04 10:36 PM


All times are GMT +1. The time now is 12:56 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"