You don't need VBA to do what you want, especially if this is a one-time or
a rather infrequent event. But, if you must, use the macro recorder (Tools
| Macro Record new macro...) to record the below.
Select column E, then Edit | Go to... | Special... button. In the next
dialog box, select the 'Blanks' option and click OK. This will select
everything but E15. So, hold down CTRL and select E15. Now, enter the
formula=-SUM($E$5:E14) and complete the task with CTRL+ENTER. Note the use
of both absolute and relative addresses in the formula.
If you did record the above, turn off the recorder and switch to the VBE.
In most cases, XL will have generated the relevant code. In addition, if
you share it here, someone should be able to generalize it for you.
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article <jlSwg.103656$IZ2.89672@dukeread07,
says...
Below is a small sample of amts in Col E starting in row 5 which I'de
Like to have a macro enter (the totals) in
E6 -702.96
E9 -1,093.69
E11 -167.92
E15 -502.11
But for the life of me I can't get it going.
Can someone assist?
TIA,
Row E
5 702.96
6
7 285.85
8 807.84
9
10 167.92
11
12 60.28
13 145.1
14 296.73
15