Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Change Rows/Columns in range???

Got it, thanks! :)

"Tom Ogilvy" wrote in message
...
use offset



--
Regards,
Tom Ogilvy

"43fan" wrote in message
...

Also, I need to change the columns for the data that I'm using. IOW,

for
the first set of data, I may be using A13:A14, second set of data then

is
D13:D14. Resizing I'm sure isn't the right way to change the column, but

I
don't know what is then.

Thanks!
Shawn
PS - Thanks, I think the resizing will work fine for the rows, just need

to
figure out the column part. :)
"Pete McCosh" wrote in message
...
Shawn,

try

set rng1 = rng1.resize(rng1.rows.count + i, 1)

Although this will probably have the effect of increasing
by one row on the first pass, two on the second and so on,
so maybe:
set rng1 = rng1.resize(rng1.rows.count + 1, 1)

would be better?

Cheers, Pete

-----Original Message-----
I'm running the Forecast() function, which uses ranges in
order to process.
I initialize two variables, rng1 and rng2 to type range,
then set them equal
to the starting range I want.

I'm running it in a nested loop, based on (a) - how many
data sets and (b)
how many points of data within each set. I need to
increase the range with
each data set, as well as change the column it's looking
at for each data
point.

Say I'm starting with this:
rng1 = "B13:B14"
rng2 = "A13:A14"

Running var1=application.Forecast(0,rng2,rng1) works
fine, but of course I
get the same value for all data points/all data sets. I
can't figure out
how to get the ranges to resize, using rng1.Resize
(rng1.rows + i,1)
gives me a type mismatch error.

Help???!!!

Thanks!
Shawn


.







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 change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
Excel 2003 - change columns to rows and rows to columns Trish Excel Discussion (Misc queries) 0 August 17th 07 02:22 AM
Excel 2003 - change columns to rows and rows to columns JLatham Excel Discussion (Misc queries) 0 August 17th 07 02:05 AM
Change Columns to Rows Diane Walker Excel Discussion (Misc queries) 2 January 31st 07 04:07 PM
How do change rows to colums AND columns to rows Colleen A Excel Discussion (Misc queries) 7 December 30th 05 12:40 AM


All times are GMT +1. The time now is 06:23 AM.

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"