Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RJ RJ is offline
external usenet poster
 
Posts: 40
Default Offset code for dynamic row# & multiple columns in LINEST function

Hi,
I found this offset formula in a different post
offset(A1,1,0,counta(A:A)-1,1),
I think this is kind of what I am looking for, but I'm not positive, but I
would need it for multiple columns.

Essentially i need the following, (x being a dynamic row number being
determined by the last cell to have a value in the range).

=LINEST(B2:Bx,C2:Fx,TRUE,TRUE)

Any help is greatly appreciated, Thanks!

Best,

--
RJ
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Offset code for dynamic row# & multiple columns in LINEST function

I'm assuming there will be no empty cells *within* the ranges.

For B2:Bx (B1 is the column header and *is not* a number)

=B2:INDEX(B:B,COUNT(B:B)+1)

For C2:Fx

=OFFSET(C2,,,COUNT(B:B),4)

Biff

"RJ" wrote in message
...
Hi,
I found this offset formula in a different post
offset(A1,1,0,counta(A:A)-1,1),
I think this is kind of what I am looking for, but I'm not positive, but I
would need it for multiple columns.

Essentially i need the following, (x being a dynamic row number being
determined by the last cell to have a value in the range).

=LINEST(B2:Bx,C2:Fx,TRUE,TRUE)

Any help is greatly appreciated, Thanks!

Best,

--
RJ



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RJ RJ is offline
external usenet poster
 
Posts: 40
Default Offset code for dynamic row# & multiple columns in LINEST func

Hey Biff,

That worked brilliantly, I really appreciate the help!

Can the same be done to columns, meaning if the row is always 2 but the
array coming accross the columns will vary? Is there away to dynamically
offset the column?

For example:
If I wanted to make the IJ$2 dynamic, where the column reference is always
the furthest to the right available. How would I offset the following.

=SUM(IF(Factors!$E$2:IJ$2=D9,0,IF(Factors!$E$2:IJ $2-9999,1,0)))

I've tried a couple of differnt ways with the =Offset function,
unsuccessfuly....

Thanks again for the help. I really appreciate it.

Best

RJ

---
"T. Valko" wrote:

I'm assuming there will be no empty cells *within* the ranges.

For B2:Bx (B1 is the column header and *is not* a number)

=B2:INDEX(B:B,COUNT(B:B)+1)

For C2:Fx

=OFFSET(C2,,,COUNT(B:B),4)

Biff

"RJ" wrote in message
...
Hi,
I found this offset formula in a different post
offset(A1,1,0,counta(A:A)-1,1),
I think this is kind of what I am looking for, but I'm not positive, but I
would need it for multiple columns.

Essentially i need the following, (x being a dynamic row number being
determined by the last cell to have a value in the range).

=LINEST(B2:Bx,C2:Fx,TRUE,TRUE)

Any help is greatly appreciated, Thanks!

Best,

--
RJ




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Offset code for dynamic row# & multiple columns in LINEST func

Like this:

=Factors!$E$2:INDEX(Factors!$E$2:$IV$2,COUNT(Facto rs!$E$2:$IV$2))

Again, assuming no empty cells *within* the range.

If you use this as a named range:

InsertNameDefine
Name: rng
Refers to: the above formula

Then this array formula:

=SUM(IF(rng=D9,0,IF(rng-9999,1,0)))

Biff

"RJ" wrote in message
...
Hey Biff,

That worked brilliantly, I really appreciate the help!

Can the same be done to columns, meaning if the row is always 2 but the
array coming accross the columns will vary? Is there away to dynamically
offset the column?

For example:
If I wanted to make the IJ$2 dynamic, where the column reference is always
the furthest to the right available. How would I offset the following.

=SUM(IF(Factors!$E$2:IJ$2=D9,0,IF(Factors!$E$2:IJ $2-9999,1,0)))

I've tried a couple of differnt ways with the =Offset function,
unsuccessfuly....

Thanks again for the help. I really appreciate it.

Best

RJ

---
"T. Valko" wrote:

I'm assuming there will be no empty cells *within* the ranges.

For B2:Bx (B1 is the column header and *is not* a number)

=B2:INDEX(B:B,COUNT(B:B)+1)

For C2:Fx

=OFFSET(C2,,,COUNT(B:B),4)

Biff

"RJ" wrote in message
...
Hi,
I found this offset formula in a different post
offset(A1,1,0,counta(A:A)-1,1),
I think this is kind of what I am looking for, but I'm not positive,
but I
would need it for multiple columns.

Essentially i need the following, (x being a dynamic row number being
determined by the last cell to have a value in the range).

=LINEST(B2:Bx,C2:Fx,TRUE,TRUE)

Any help is greatly appreciated, Thanks!

Best,

--
RJ






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
OFFSET for multiple columns & combobox format sahafi Charts and Charting in Excel 2 April 30th 07 02:28 PM
Dynamic reference in OFFSET function manu Excel Worksheet Functions 1 February 14th 07 01:00 PM
Offset function problem-Dynamic range MarkM Excel Discussion (Misc queries) 1 November 11th 06 02:41 AM
Offset function and Dynamic Ranges SandyLACA Excel Discussion (Misc queries) 2 August 2nd 06 11:07 PM
Vlookup/match/offset over multiple columns of lable csw78 Excel Discussion (Misc queries) 6 June 8th 05 04:39 PM


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