If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
AUTO ADDITION
I AM LOOKING FOR A WAY TO HAVE EXCEL AUTOMATICALLY DO
SOME MATH FOR ME. FOR EXAMPLE, IF I TYPE 25 IN CELL B4, I WANT IT TO AUTOMATICALLY ADD 25 TO IT. ANY THOUGHTS? THANKS YOU FOR YOUR TIME. |
#2
|
|||
|
|||
AUTO ADDITION
Hi
do you want the result in the same cell (that is the value 50 placed in cell B4?) or is a separate cell sufficient?. for the latter one you can simply use the formula =B4+25 placed for example in cell C4 For storing the result in the same cell an event procedure is required but I would try to use a helper cell. Post back if this is not sufficient for you -- Regards Frank Kabel Frankfurt, Germany wrote: I AM LOOKING FOR A WAY TO HAVE EXCEL AUTOMATICALLY DO SOME MATH FOR ME. FOR EXAMPLE, IF I TYPE 25 IN CELL B4, I WANT IT TO AUTOMATICALLY ADD 25 TO IT. ANY THOUGHTS? THANKS YOU FOR YOUR TIME. |
#3
|
|||
|
|||
AUTO ADDITION
I WOULD LIKE TO KEEP IT IN THE SAME CELL IF POSSIBLE. I
HAVE NO IDEA HOW TO DO AN EVENT PROCEDURE. I'M GUESSING BY HELPER CELL YOU MEAN STORE IT IN ANOTHER CELL? -----Original Message----- Hi do you want the result in the same cell (that is the value 50 placed in cell B4?) or is a separate cell sufficient?. for the latter one you can simply use the formula =B4+25 placed for example in cell C4 For storing the result in the same cell an event procedure is required but I would try to use a helper cell. Post back if this is not sufficient for you -- Regards Frank Kabel Frankfurt, Germany wrote: I AM LOOKING FOR A WAY TO HAVE EXCEL AUTOMATICALLY DO SOME MATH FOR ME. FOR EXAMPLE, IF I TYPE 25 IN CELL B4, I WANT IT TO AUTOMATICALLY ADD 25 TO IT. ANY THOUGHTS? THANKS YOU FOR YOUR TIME. . |
#5
|
|||
|
|||
AUTO ADDITION
Copy the code below, right click on the sheet tab, select view code, and
paste the code in the window that appears. This code will apply your desired behavior to cells B2:B10, if they are changed one at a time. HTH, Bernie MS Excel MVP Private Sub Worksheet_Change(ByVal Target As Range) Dim myVal As Variant If Target.Cells.Count 1 Then Exit Sub Application.EnableEvents = False If Not (Intersect(Range("B2:B10"), Target) Is Nothing) Then myVal = Target.Value Application.Undo Target.Value = Target.Value + myVal End If Application.EnableEvents = True End Sub wrote in message ... I AM LOOKING FOR A WAY TO HAVE EXCEL AUTOMATICALLY DO SOME MATH FOR ME. FOR EXAMPLE, IF I TYPE 25 IN CELL B4, I WANT IT TO AUTOMATICALLY ADD 25 TO IT. ANY THOUGHTS? THANKS YOU FOR YOUR TIME. |
Thread Tools | |
Display Modes | |
|
|