Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default two cell accumulator

sub AddtoTotal()

if isnumeric(Range("A1")) then Range("B1") = Range("B1")+Range("A1")

end sub


Is the simplest way I can think of.

"JCook423" wrote:

Hello, I came across this,

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "A1" Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
Range("B1").Value = Range("B1").Value + .Value
Application.EnableEvents = True
End If
End If
End With
End Sub

which works fine by dropping it into the sheet coding. However what Im
trying to do is alter this code so I can €śAssign Macro€¦€ť it to a
button/object/autoshape that I can click to trigger the event instead of the
event trigger automatically as it does now.

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
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
Please help fix my accumulator Tim McMahon Excel Programming 3 May 23rd 04 09:06 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 02:40 AM.

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

About Us

"It's about Microsoft Excel"