Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default named range / offset

I am trying to create a dynamic range.

so far i have had luck with the suggestion form another user to use:

=OFFSET($C$8,0,0,COUNTA($C:$C),1)

that works when the range is in one column.

what do i change if i want to expand the range to say, AF?

I have tried

=OFFSET($C$8:$AF$8,0,0,COUNTA($C:$C),1)
and
=OFFSET($C$8,0,0,COUNTA($C:$AF),1)

but neither seemed to work. what am i missing?

thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default named range / offset

and as usual as soon as i post i look at the help for Offset.....

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($C:$AF))
gives you both height and width



"Gixxer_J_97" wrote:

I am trying to create a dynamic range.

so far i have had luck with the suggestion form another user to use:

=OFFSET($C$8,0,0,COUNTA($C:$C),1)

that works when the range is in one column.

what do i change if i want to expand the range to say, AF?

I have tried

=OFFSET($C$8:$AF$8,0,0,COUNTA($C:$C),1)
and
=OFFSET($C$8,0,0,COUNTA($C:$AF),1)

but neither seemed to work. what am i missing?

thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default named range / offset



always a good idea to check help. (first? :)
however you've got it almost right..

the width will get TOO big and the formula will be too slow.

you'll need as wide as the number of headers, correct?
assuming those are in row 8..

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($8:$8))




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Gixxer_J_97 wrote :

and as usual as soon as i post i look at the help for Offset.....

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($C:$AF))
gives you both height and width



"Gixxer_J_97" wrote:

I am trying to create a dynamic range.

so far i have had luck with the suggestion form another user to use:

=OFFSET($C$8,0,0,COUNTA($C:$C),1)

that works when the range is in one column.

what do i change if i want to expand the range to say, AF?

I have tried

=OFFSET($C$8:$AF$8,0,0,COUNTA($C:$C),1)
and
=OFFSET($C$8,0,0,COUNTA($C:$AF),1)

but neither seemed to work. what am i missing?

thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default named range / offset

hmmmm - i see what you mean, but i don't quite understand why the width would
get too big. i do see that it is much easier to just count the headers - but
i was thinking that it would be the same as counting C:AF

my headers are in row 7, the data i'll actually be using starts in row 8
from C:AF

i'll try your version and go from there

thanks for the help!

J

"keepITcool" wrote:



always a good idea to check help. (first? :)
however you've got it almost right..

the width will get TOO big and the formula will be too slow.

you'll need as wide as the number of headers, correct?
assuming those are in row 8..

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($8:$8))




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Gixxer_J_97 wrote :

and as usual as soon as i post i look at the help for Offset.....

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($C:$AF))
gives you both height and width



"Gixxer_J_97" wrote:

I am trying to create a dynamic range.

so far i have had luck with the suggestion form another user to use:

=OFFSET($C$8,0,0,COUNTA($C:$C),1)

that works when the range is in one column.

what do i change if i want to expand the range to say, AF?

I have tried

=OFFSET($C$8:$AF$8,0,0,COUNTA($C:$C),1)
and
=OFFSET($C$8,0,0,COUNTA($C:$AF),1)

but neither seemed to work. what am i missing?

thanks!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default named range / offset

counta(c:af) counts all filled cells in all rows in the range.
so the width might be a bit bigger than you bargained for.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Gixxer_J_97 wrote :

hmmmm - i see what you mean, but i don't quite understand why the
width would get too big. i do see that it is much easier to just
count the headers - but i was thinking that it would be the same as
counting C:AF

my headers are in row 7, the data i'll actually be using starts in
row 8 from C:AF

i'll try your version and go from there

thanks for the help!

J

"keepITcool" wrote:



always a good idea to check help. (first? :)
however you've got it almost right..

the width will get TOO big and the formula will be too slow.

you'll need as wide as the number of headers, correct?
assuming those are in row 8..

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($8:$8))




--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



Gixxer_J_97 wrote :

and as usual as soon as i post i look at the help for Offset.....

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($C:$AF))
gives you both height and width



"Gixxer_J_97" wrote:

I am trying to create a dynamic range.

so far i have had luck with the suggestion form another user to
use:

=OFFSET($C$8,0,0,COUNTA($C:$C),1)

that works when the range is in one column.

what do i change if i want to expand the range to say, AF?

I have tried

=OFFSET($C$8:$AF$8,0,0,COUNTA($C:$C),1)
and
=OFFSET($C$8,0,0,COUNTA($C:$AF),1)

but neither seemed to work. what am i missing?

thanks!




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default named range / offset

now that makes perfect sense!

thanks!

J

"keepITcool" wrote:

counta(c:af) counts all filled cells in all rows in the range.
so the width might be a bit bigger than you bargained for.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Gixxer_J_97 wrote :

hmmmm - i see what you mean, but i don't quite understand why the
width would get too big. i do see that it is much easier to just
count the headers - but i was thinking that it would be the same as
counting C:AF

my headers are in row 7, the data i'll actually be using starts in
row 8 from C:AF

i'll try your version and go from there

thanks for the help!

J

"keepITcool" wrote:



always a good idea to check help. (first? :)
however you've got it almost right..

the width will get TOO big and the formula will be too slow.

you'll need as wide as the number of headers, correct?
assuming those are in row 8..

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($8:$8))




--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam


Gixxer_J_97 wrote :

and as usual as soon as i post i look at the help for Offset.....

=OFFSET($C$8,0,0,COUNTA($C:$C),COUNTA($C:$AF))
gives you both height and width



"Gixxer_J_97" wrote:

I am trying to create a dynamic range.

so far i have had luck with the suggestion form another user to
use:

=OFFSET($C$8,0,0,COUNTA($C:$C),1)

that works when the range is in one column.

what do i change if i want to expand the range to say, AF?

I have tried

=OFFSET($C$8:$AF$8,0,0,COUNTA($C:$C),1)
and
=OFFSET($C$8,0,0,COUNTA($C:$AF),1)

but neither seemed to work. what am i missing?

thanks!


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
Named range is hidden when using OFFSET() Conan Kelly Excel Discussion (Misc queries) 1 October 8th 07 08:56 PM
named range row offset [email protected] Excel Worksheet Functions 5 July 8th 06 01:35 AM
Dynamic named range & Offset fastballfreddy Excel Discussion (Misc queries) 1 May 4th 06 09:00 AM
Offset delivers value error with Named range [email protected] Excel Worksheet Functions 4 November 29th 05 12:49 PM
named range, offset self-reference George Excel Discussion (Misc queries) 6 November 6th 05 11:21 PM


All times are GMT +1. The time now is 12:42 PM.

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"