LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macro problems


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Problems gillj Excel Discussion (Misc queries) 1 May 6th 06 11:51 AM
Macro problems Retta Excel Worksheet Functions 2 May 18th 05 10:39 PM
macro problems John Garate Excel Programming 1 January 12th 05 09:34 AM
various macro problems legepe[_12_] Excel Programming 0 October 23rd 04 11:07 PM
Macro problems in XP Eva Shanley[_2_] Excel Programming 1 September 21st 04 05:37 PM


All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"