Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Defining series range for named range

I need to create a bunch of named ranges. The series range I want to use
would be created using this OFFSET formula

I want do do the following:

For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
seriesrange =
OFFSET(Statics!$C$1,MATCH(Statics!$C:$C,Statics!$B $1)-1,0,COUNTIF(Statics!$C:$C,Statics!$B$1),3)

Next I

Anything that reads Statics!$B$1 will be replaced with Cells(i, 2)

What needs to change so that seriesrange is dynamically determined based on
the value of Cells(i,2)?

Thanks in advance,
Barb Reinhardt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Defining series range for named range


Użytkownik "Barb Reinhardt"
napisał w wiadomo¶ci
...
I need to create a bunch of named ranges. The series range I want to use
would be created using this OFFSET formula

I want do do the following:

For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
seriesrange =

OFFSET(Statics!$C$1,MATCH(Statics!$C:$C,Statics!$B $1)-1,0,COUNTIF(Statics!$C
:$C,Statics!$B$1),3)

Next I

Anything that reads Statics!$B$1 will be replaced with Cells(i, 2)

What needs to change so that seriesrange is dynamically determined based

on
the value of Cells(i,2)?

Thanks in advance,
Barb Reinhardt


this sub will name each of range using value of cells(i,2)

For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
seriesrange = Cells(i, 1).Value
ActiveWorkbook.Names.Add Name:="seriesrange", _
RefersToR1C1:="=OFFSET(Statics!r1c3,MATCH(c3,r1c2)-1,0,COUNTIF(c3,r1c2),3)"
Next i

hth
mcg


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
Looking up a returned value defining a named range DRC Excel Discussion (Misc queries) 2 March 23rd 10 02:49 PM
Defining a custom-named Range across several worksheets Sven Herremans Excel Worksheet Functions 3 October 23rd 07 12:23 PM
Defining Named Range for Lastrow in a specific column Barb Reinhardt Excel Discussion (Misc queries) 5 May 9th 07 08:55 PM
Defining a named range for a dynamic result set Keith B.[_2_] Excel Programming 2 April 19th 06 10:26 PM
Defining maximum value from a named range for charting purposes Barb Reinhardt Charts and Charting in Excel 2 March 8th 06 04:11 PM


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