Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Trying to write a macro but I am hopeless. I have a list of increasing values in column a in column b I am trying to put in the difference in value compared with the first cell so far I have this. ' Keyboard Shortcut: Ctrl+w ' ActiveCell.FormulaR1C1 = "=SUM(RC[-1]-R[-1]C[-1])" With Selection.Interior ..ColorIndex = 3 ..Pattern = xlSolid End With Selection.Offset(1, 0).Select ' move down If I could get the -1 in the -R[-1] part of the formula to increase by 1 every time the cursor went down a cell this would be great until i came to the next list of increasing values where it would need to start at -1 again. Any help with this would be great regards John -- toolpusher ------------------------------------------------------------------------ toolpusher's Profile: http://www.excelforum.com/member.php...o&userid=19062 View this thread: http://www.excelforum.com/showthread...hreadid=346083 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Problems | Excel Discussion (Misc queries) | |||
Macro problems | Excel Worksheet Functions | |||
macro problems | Excel Programming | |||
various macro problems | Excel Programming | |||
Macro problems in XP | Excel Programming |