Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
subtracting from multiple cells
I am trying to subtract a given number from numerous cells i.e. A1,A2,A3,-6.
I want to do this from a remote cell by just entering a number. This cell will be used to update these cells (i.e. A1,A2,A3) on a daily basis. The target cells should update with each entry. Thanks in advance, as you can tell I am a Novice. I am more of a access user. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
subtracting from multiple cells
Assuming the range you want to change is A1:A6 and the remote cell is H1 and
they are all on the same sheet, the following macro does what you want. Note that this macro is a sheet macro and must be placed in the sheet module of the sheet in question. To access that sheet, right-click on the sheet tab, select View Code. Paste this macro into the displayed module. "X" out of the module to return to the sheet. HTH Otto Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(0, 0) = "H1" Then Target.Copy Range("A1:A6").PasteSpecial Paste:=xlPasteAll, Operation:=xlSubtract End If End Sub "He cries for help" <He cries for wrote in message ... I am trying to subtract a given number from numerous cells i.e. A1,A2,A3,-6. I want to do this from a remote cell by just entering a number. This cell will be used to update these cells (i.e. A1,A2,A3) on a daily basis. The target cells should update with each entry. Thanks in advance, as you can tell I am a Novice. I am more of a access user. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
subtracting from multiple cells
Hi,
One way by using formula. Create a helper column lets say in column C with the data which is in A1,A2€¦. In H1 is the remote cell by which you want to subtract a given number. Put in A1 this formula =C1-H$1 and copy down. You can either hide or put the helper column in a different sheet if you want. Regards, Tim "He cries for help" wrote: I am trying to subtract a given number from numerous cells i.e. A1,A2,A3,-6. I want to do this from a remote cell by just entering a number. This cell will be used to update these cells (i.e. A1,A2,A3) on a daily basis. The target cells should update with each entry. Thanks in advance, as you can tell I am a Novice. I am more of a access user. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What formula is used for subtracting a range of different cells f. | Excel Worksheet Functions | |||
Subtracting days from cells | Excel Worksheet Functions | |||
subtracting multiple values between sheets | Setting up and Configuration of Excel | |||
Subtracting From 2 Cells | Excel Worksheet Functions | |||
Subtracting 2 Now() Cells | Excel Worksheet Functions |