Hi
I need some help to fix up my offset formula in my defined name range.
I have used the following formula in my Spreadsheet for the ROW i need to define.
=OFFSET(Table!$C$2,0,0,1,COUNTA(Table!$2:$2)-1)
trouble is, that this formula seems to also marquee the cell to the right of it, which is blank.
Any suggestions?
Last edited by ssdsibes; 07-05-2009 at 06:19 AM.
It would help if we knew what you were trying to do and the data layout, no?
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
I think the issue is you have your height and width mixed...
=OFFSET(Table!$C$2,0,0,COUNTA(Table!$2:$2)-1,1)
Your original formula had a height of 1 and width of COUNTA.
=OFFSET(Table!$C$2,0,0,1,COUNTA(Table!$2:$2)-1)
sorry about not being clear
I have a spreadsheet with Dates along Row2 and corresponding data below in Row3.
I want my graph to dynamically update when new data is keyed into the next blank Row3. I know how to setup my Named ranges, but i'm having trouble with the offset formula.
Hi Chance2
thanks for that, but i do want the referencing to be wide not high. I need the formula to go across the rows, not down the columns.
if i use this formula it goes down the column of C
, but i need the formula to go across Row2Code:=OFFSET(Table!$C$2,0,0,COUNTA(Table!$2:$2)-1,1)
Using COUNTA etc is open to error if you have blanks interspersed in a range - also it is important to know what resides in A2:B2 ...
IMO often better to use INDEX with MATCH... if we assume values in row 3 are numeric, that the first cell (C2) contains a number then you can use the following as your RefersTo formula:
=Table!$C$2:INDEX(Table!$2:$2,MATCH(9.99999999999999E+307,$2:$2))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
that works perfectly, now i have to learn and understand INDEX and MATCH.
can you explain this a little for me, or point me to a good doco?
In this example we're using INDEX in "Reference Form" as it's documented in the help files, ie using INDEX to return a Range as opposed to a Value (Array Form).
Re: the use of MATCH etc - I would suggest having a read through of Bob Phillips' article: http://www.xldynamic.com/source/xld.LastValue.html
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Hi DonkeyOte
I have had a play with Index and match, but now i'm struggling with this scenerio.
If i wanted to use INDEX & MATCH in a column situation, that contained blanks, but was determined by the fact that there is data in the column directly to the left of it, how would this work
My column that has the defined range is D, starting at Row 4. I need the defined range to search on Column D, that currently has 20 entries in the spreadsheet, but only 1 entry in ColD, but there is a potential for ColD to grow and include entries. See attached example
=NewDifficult!$C$4:INDEX(NewDifficult!$C:$C,MATCH(9.99999999999999E+307,$C:$C))
I can't really tie out your attachment to your narrative - ie everything seems to start from row 3 rather than 4 etc...
In short you can use another cell to determine end position in another column by altering the INDEX / MATCH range references, eg:
=$D$3:INDEX($D:$D,MATCH(REPT("Z",255),$C:$C))
would create a range referring to D where end position is determined by last text entry in C.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
that worked, thank you!
sorry about the confusion.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks