MS Office Forum / Excel / New Users / November 2007
Reference cells in named range
|
|
Thread rating:  |
Luca Brasi - 02 Nov 2007 08:46 GMT I have a large sheet with data. One of the columns is defined as a named range (Key_x). On another sheet, I would like to reference to some cells in that column. Is it possible to use something like =Key_x!5 to get the value of the 5th cell (row) in this named range? Thanks for any hints.
sharon - 02 Nov 2007 09:25 GMT Hi Luca,
You could use OFFSET, as follows.
RANHGE("KEY_X").OFFSET(nRows,0) if in the same column,
HTH, Sharon
> I have a large sheet with data. One of the columns is defined as a named > range (Key_x). [quoted text clipped - 3 lines] > to get the value of the 5th cell (row) in this named range? > Thanks for any hints. Luca Brasi - 02 Nov 2007 09:50 GMT Sharon, thanks for your reply.
I tried =RANGE("key_x").OFFSET(2;0) which is your formula adjusted to my needs.
I tried as well =OFFSET(key_a; 2; 0) because the OFFSET formula seems to take three parameters.
But Excel keeps on telling me that the formula contains an error. What am I missing??
BTW, using Excel XP and I don't talk about VBA.
> Hi Luca, > [quoted text clipped - 12 lines] >> to get the value of the 5th cell (row) in this named range? >> Thanks for any hints. sharon - 02 Nov 2007 10:04 GMT Hi Luca,
I was meaning within VBA. Sorry for that!
If in Excel , is almost the same, give a try to: =OFFSET(key_a, 2, 0)
Take care with colons or semicolons, depending what country configuration you have.
HTH
> Sharon, thanks for your reply. > [quoted text clipped - 27 lines] > >> to get the value of the 5th cell (row) in this named range? > >> Thanks for any hints. Luca Brasi - 02 Nov 2007 10:17 GMT I already tried different things using the OFFSET formula. But didn't succeed. Have you really got it working??
> Hi Luca, > [quoted text clipped - 39 lines] >>>> to get the value of the 5th cell (row) in this named range? >>>> Thanks for any hints. Luca Brasi - 02 Nov 2007 10:23 GMT =OFFSET(key_a, 0, 0) would work as formula, but of course makes no sense...
> I already tried different things using the OFFSET formula. But didn't > succeed. Have you really got it working?? [quoted text clipped - 39 lines] >>>>> to get the value of the 5th cell (row) in this named range? >>>>> Thanks for any hints. sharon - 02 Nov 2007 10:32 GMT Hi Luca,
Sure I've it working!
You may publish an example of what are you doing... By the way, did you try something like =key_a ??
(it should work the same as =OFFSET(key_a,0,0) ....
Sharon
> I already tried different things using the OFFSET formula. But didn't > succeed. Have you really got it working?? [quoted text clipped - 42 lines] > >>>> to get the value of the 5th cell (row) in this named range? > >>>> Thanks for any hints. Luca Brasi - 02 Nov 2007 10:55 GMT I don't do anything more than explained in my first post. I have a column defined as a named range. On another sheet I try to reference specific cells (based on the row index) in that range.
I just don't see why I fail to get the value of the second row in the named column using =OFFSET(key_a,1,0)
I always get a REF error. What am I doing wrong?
> Hi Luca, > [quoted text clipped - 54 lines] >>>>>> to get the value of the 5th cell (row) in this named range? >>>>>> Thanks for any hints. Luca Brasi - 02 Nov 2007 11:00 GMT Just "=key_a" works (as well as "=OFFSET(key_a,0,0)") but is not what I need. I want to be able to define a different row index.
> Hi Luca, > [quoted text clipped - 54 lines] >>>>>> to get the value of the 5th cell (row) in this named range? >>>>>> Thanks for any hints. sharon - 02 Nov 2007 11:51 GMT So, if I understand well:
=key_a works =offset(key_a,0,0) works
AND
=offset(key_a,3,0) DOESN'T WORK
Am I right?
If so, my Excel knowledge doesn't go so far .....
Sharon
> Just "=key_a" works (as well as "=OFFSET(key_a,0,0)") but is not what I > need. I want to be able to define a different row index. [quoted text clipped - 57 lines] > >>>>>> to get the value of the 5th cell (row) in this named range? > >>>>>> Thanks for any hints. Luca Brasi - 02 Nov 2007 11:56 GMT Correct. I now even tested it on another machine using Excel 2007. Same behavior.
> So, if I understand well: > [quoted text clipped - 72 lines] >>>>>>>> to get the value of the 5th cell (row) in this named range? >>>>>>>> Thanks for any hints. sharon - 02 Nov 2007 12:28 GMT Luca,
I think I got it!
If range name involves more than one cellm, then you need
=offset(key_a,0,0,nRows,0)
Give it a try!
HTH,
Sharon
> Correct. I now even tested it on another machine using Excel 2007. Same > behavior. [quoted text clipped - 75 lines] > >>>>>>>> to get the value of the 5th cell (row) in this named range? > >>>>>>>> Thanks for any hints. Luca Brasi - 02 Nov 2007 13:06 GMT didn't do it either for me... anyway, thanks for your time!
> Luca, > [quoted text clipped - 89 lines] >>>>>>>>>> to get the value of the 5th cell (row) in this named range? >>>>>>>>>> Thanks for any hints. Stan Brown - 04 Nov 2007 20:25 GMT Fri, 2 Nov 2007 04:28:00 -0700 from sharon <sharon_scott@msn.com>:
> Luca, > [quoted text clipped - 3 lines] > > =offset(key_a,0,0,nRows,0) I think you mean that last parameter (number of columns) to be a 1.
For that matter, unless we're talking about an array formula I think the penultimate parameter (number of rows) also needs to be a 1.
 Signature Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com/ "If there's one thing I know, it's men. I ought to: it's been my life work." -- Marie Dressler, in /Dinner at Eight/
kounoike - 03 Nov 2007 04:16 GMT How about using INDEX like "=INDEX(te,5)" instead of using OFFSET ?
keizi
> Just "=key_a" works (as well as "=OFFSET(key_a,0,0)") but is not what I > need. I want to be able to define a different row index. [quoted text clipped - 51 lines] >>>>>>> to get the value of the 5th cell (row) in this named range? >>>>>>> Thanks for any hints. Ron Rosenfeld - 02 Nov 2007 12:31 GMT >I have a large sheet with data. One of the columns is defined as a named >range (Key_x). [quoted text clipped - 3 lines] >to get the value of the 5th cell (row) in this named range? >Thanks for any hints. =INDEX(named_range,2,1)
will refer to row 2 in the named range
If named_range only has a single column, then the column argument is optional. --ron
Luca Brasi - 02 Nov 2007 13:04 GMT you rock! thank you very much, ron.
>> I have a large sheet with data. One of the columns is defined as a named >> range (Key_x). [quoted text clipped - 10 lines] > If named_range only has a single column, then the column argument is optional. > --ron Ron Rosenfeld - 02 Nov 2007 22:50 GMT >you rock! thank you very much, ron. You're welcome. Glad to help. Thanks for the feedback. --ron
David Heaton - 02 Nov 2007 14:30 GMT Luca,
Sharon was on the right lines with her suggestions I just think there were some misunderstandings. The format for OFFSET is - =OFFSET (Range, RowOffset,ColOffset, ReturnHeight,ReturnWidth)
So for your need you would use
offset(key_a,1,4,1,1)
that will return the item in col 1 and row 5 of your range..... (offset starts counting at zero hence why 4 will return the 5th row)
Hope this helps
David
>I have a large sheet with data. One of the columns is defined as a named >range (Key_x). [quoted text clipped - 3 lines] > to get the value of the 5th cell (row) in this named range? > Thanks for any hints. Luca Brasi - 02 Nov 2007 15:31 GMT Thanks for the info.
> Luca, > [quoted text clipped - 20 lines] >> to get the value of the 5th cell (row) in this named range? >> Thanks for any hints.
|
|
|