Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Change Named Cell ranges based upon value of another cell?

What I have is a row of numbers that contain 2 named ranges (Front and Back).
Both ranges are 7 columns wide and 1 row deep. What I want to do is change
the location of the ranges based upon another cell.

For instance, here are the numbers (each in it's own column):
5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3, 8,9

The ranges are each 7 columns wide and are offset by the value in another
cell:
For instance if the cell contains 5, the range "Front" would be 1,6,3,8,9,5,2

Can someone point me in the right direction?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Change Named Cell ranges based upon value of another cell?

Hi,

while defining a name, instead of actual range, you can use formula
like this:

=offset(b1,0,a1,1,7)

supposing that your values
(5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3 ,8,9 ) are in second
row, starting at b1, and the cell which contains 5 is a1.

Did it help?

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Change Named Cell ranges based upon value of another cell?

Define Front as

=OFFSET($1:$1,0,$A$10-1,1,7)

where A10 is the cell with the value

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"fedude" wrote in message
...
What I have is a row of numbers that contain 2 named ranges (Front and

Back).
Both ranges are 7 columns wide and 1 row deep. What I want to do is

change
the location of the ranges based upon another cell.

For instance, here are the numbers (each in it's own column):
5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3, 8,9

The ranges are each 7 columns wide and are offset by the value in another
cell:
For instance if the cell contains 5, the range "Front" would be

1,6,3,8,9,5,2

Can someone point me in the right direction?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Change Named Cell ranges based upon value of another cell?

insert = Name = Define

Name: Front
RefersTo: =Offset(Sheet1!$A$1,0,Sheet1!$F$20 - 1,1,7)

Assume F20 contains the value 5 and the data you show starts in A1 and
extends across row 1.

--
Regards,
Tom Ogilvy


"fedude" wrote:

What I have is a row of numbers that contain 2 named ranges (Front and Back).
Both ranges are 7 columns wide and 1 row deep. What I want to do is change
the location of the ranges based upon another cell.

For instance, here are the numbers (each in it's own column):
5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3, 8,9

The ranges are each 7 columns wide and are offset by the value in another
cell:
For instance if the cell contains 5, the range "Front" would be 1,6,3,8,9,5,2

Can someone point me in the right direction?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Change Named Cell ranges based upon value of another cell?

Perfect. Thanks to all who answered with the "offset" solution.

"Bob Phillips" wrote:

Define Front as

=OFFSET($1:$1,0,$A$10-1,1,7)

where A10 is the cell with the value

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"fedude" wrote in message
...
What I have is a row of numbers that contain 2 named ranges (Front and

Back).
Both ranges are 7 columns wide and 1 row deep. What I want to do is

change
the location of the ranges based upon another cell.

For instance, here are the numbers (each in it's own column):
5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3,8,9,5,2,7,4,1,6,3, 8,9

The ranges are each 7 columns wide and are offset by the value in another
cell:
For instance if the cell contains 5, the range "Front" would be

1,6,3,8,9,5,2

Can someone point me in the right direction?




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
building formulas that change frequently using named cell ranges Sheldon Excel Worksheet Functions 4 December 6th 07 04:35 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
formula for named cell/range based on cell values alex Excel Programming 2 August 25th 05 02:50 PM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 7 December 9th 04 01:59 PM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 1 December 9th 04 09:57 AM


All times are GMT +1. The time now is 09:13 PM.

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"