LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Need a accumulator driven from second cell

I am new to VBA, just got book yesterday.
Found some code for entering on a column works get all by itself, but does
not help with problem.
Also found code for a single cell accumulator, also work real well all by
itself.
Need to marry these two codes, so that I input on column C and get an
accumulative total on column F. Here are the codes:

Sub ChkColC()
If ActiveCell.Column = 3 Then
If Not IsEmpty(ActiveCell) And ActiveCell < "" Then
MsgBox "Has Data"
Else
MsgBox "No Data"
End If
End If
End Sub

-AND-

Dim Val
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Cells.Count < 1 Then Exit Sub
If Target.Address = "$F$4" And IsNumeric(Target) Then
Application.EnableEvents = False
Target = Target + Val
Application.EnableEvents = True
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Cells.Count < 1 Then Exit Sub
If Target.Address = "$F$4" And IsNumeric(Target) Then
Application.EnableEvents = False
Val = Target
Application.EnableEvents = True
End If
End Sub

Need help please; thank you,
Jay

 
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
two cell accumulator Sam Wilson Excel Programming 0 November 4th 09 12:03 PM
Need help with two cell accumulator dlashley Excel Worksheet Functions 1 May 12th 06 11:02 AM
Two cell accumulator Bill Excel Worksheet Functions 4 August 21st 05 09:07 PM
Two cell accumulator Bill Excel Worksheet Functions 1 January 3rd 05 03:15 PM
Help with code for two cell accumulator ToddG Excel Programming 3 January 21st 04 01:32 PM


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