Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() When a value is entered into, say, cell B5, I want that value to be added to, say, E5. I could do this by attaching a macro to a shortcut key, or preferably when the cell loses focus. Any ideas ? Thanks Robert -- RobertLees ------------------------------------------------------------------------ RobertLees's Profile: http://www.excelforum.com/member.php...o&userid=26580 View this thread: http://www.excelforum.com/showthread...hreadid=533208 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Robert,
Put the following code in the code module for the appropriate worksheet. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$5" Then Application.EnableEvents = False Range("E5").Value = Range("E5").Value + Target.Value Application.EnableEvents = True End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "RobertLees" wrote in message ... When a value is entered into, say, cell B5, I want that value to be added to, say, E5. I could do this by attaching a macro to a shortcut key, or preferably when the cell loses focus. Any ideas ? Thanks Robert -- RobertLees ------------------------------------------------------------------------ RobertLees's Profile: http://www.excelforum.com/member.php...o&userid=26580 View this thread: http://www.excelforum.com/showthread...hreadid=533208 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
if you wanted a range in a column to be added to E5, like b5, then b6,
then b7, etc, how would you change the procedure? John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros do not work anymore! | Excel Discussion (Misc queries) | |||
how do I run excel 4.0 macros on excel 2000 | Excel Discussion (Misc queries) | |||
Excel crashes while opening excel file imbeddied with macros | Excel Discussion (Misc queries) | |||
Enabling macros | Excel Discussion (Misc queries) | |||
Transferring toolbars and macros to other computers | Excel Discussion (Misc queries) |