LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Adding Range Names

I'm wanting to add range names from a list in a spreadsheet. I have several
questions:

I have this code so far ...

Dim lastrow
Dim rangename
Dim seriesrange

CurBook = Application.ActiveWorkbook.Name
lastrow = Worksheets("SeriesList").Cells(Rows.Count, "i").End(xlUp).Row
For i = 2 To lastrow
Workbooks(CurBook).Worksheets("SeriesList").Range( "i" & i).Value =
rangename
Workbooks(CurBook).Worksheets("SeriesList").Range( "h" & i).Value =
seriesrange
ActiveWorkbook.Names.Add Name:=rangename, RefersToR1C1:=seriesrange
Next

End Sub

Question 1: What format should the rangename and seriesname be in the
spreadsheet. I currently have something that looks like this for the series
name

Name_ChartLabel (but it's calculated from other fields)
SeriesRange is listed in the workbook as
=OFFSET(K11,J11,0) where K11 is a label, J11 is the offset in rows.

What do I need to change so that this will work properly?

Thanks in advance,

Barb Reinhardt


 
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
converting email address names in a range of cells to real names John Excel Worksheet Functions 1 May 19th 10 03:44 PM
adding range names SheriTingle Excel Discussion (Misc queries) 2 July 12th 05 03:52 PM
Adding Range Names John Excel Worksheet Functions 1 January 18th 05 11:56 AM
Adding Range to Worksheet Names Collection Keith Willshaw Excel Programming 2 March 5th 04 09:17 AM
Adding and deleting Range Names Paul Excel Programming 1 October 1st 03 10:56 AM


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