Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Angol
 
Posts: n/a
Default can anyone help with repeating the same action on different ranges?

I need to perform an operation on several long series of data:

Application.Run "ATPVBAEN.XLA!Regress", ActiveSheet.Range("F2:F251"),
ActiveSheet.Range("C2:C251"), False, False, ,
ActiveSheet.Range("AM21"), False, False, False, False, , False.

This works fine on an single data set.

And I'm able to generate the thousand or so sets of addresses -
F3:F252,C3:C252,AM41, etc. that I need. Unsurprisingly, though,
VBA/Excel protests that if I copy a thousand lines like that into a
macro I get a procedure that is is too large.

The elegant way to do what I want is to instruct Excel to perform the
regression, and then move one line down in a lookup table to change the
references and then run it again.

Long ago I recorded macros in Lotus123 that would pick up an
instruction to go, e.g. 1 line down and repeat something we'd done
before and I vaguely understand what the structure of what I need would
look like.

Can anyone advise me as to what I should be doing?

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
how can i assign i set of numbers (1-16) without repeating them? Stew Excel Worksheet Functions 2 July 11th 05 07:17 PM
excluding repeating values neda5 Excel Discussion (Misc queries) 2 July 10th 05 11:59 PM
Repeating number sequence in a column Nexan Excel Discussion (Misc queries) 3 March 31st 05 07:55 PM
delete repeating rows aledger Excel Worksheet Functions 2 March 4th 05 08:43 PM
Header - stop repeating on every page! sararose27 Excel Discussion (Misc queries) 2 February 17th 05 10:41 PM


All times are GMT +1. The time now is 09:37 PM.

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

About Us

"It's about Microsoft Excel"