Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro procedures

I am trying to record a macro which begins with a cell that I click on, and
the references up the same column 5 rows to complete a calculation. Once
finished it should move down 5 rows and repeat process. Can't make it not
reference specific cell. Any suggestions??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro procedures

Sub AAA()
ActiveCell.FormulaR1C1 = "=Sum(R[-1]C:R[-4]C)"
ActiveCell.Offset(5, 0).Select
End Sub

assume you click in E5. and run the macro

It will put in the formula =Sum(E1:E4), then move to E10. Click again, it
will put in the sum
=Sum(E6:E9) then move to E15

--
Regards,
Tom Ogilvy

"Danita" wrote in message
...
I am trying to record a macro which begins with a cell that I click on,

and
the references up the same column 5 rows to complete a calculation. Once
finished it should move down 5 rows and repeat process. Can't make it not
reference specific cell. Any suggestions??



Reply
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
VBA Sub procedures lexiez Excel Programming 2 October 4th 04 04:21 PM
Hide public procedures in macro window? What-a-Tool Excel Programming 2 September 12th 04 12:44 AM
ListBox Procedures Rockee052[_48_] Excel Programming 1 February 20th 04 09:20 AM
Sequential Sub Procedures Roger[_10_] Excel Programming 3 November 20th 03 04:32 PM
Creating Event procedures from a macro Robert Stober Excel Programming 3 September 7th 03 06:52 PM


All times are GMT +1. The time now is 02:08 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"