Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I found it :))
http://www.tushar-mehta.com/excel/ne...tml#LastSoMany ---------------------------------- "Andreas" wrote: Arvi: I have a follow-up question about this: How do I specify the range, if I only want to use the last 12 entries (last 12 rows counting from the bottom)? Thanks, Andreas -------------------------------- "Arvi Laanemets" wrote: Hi "PH NEWS" wrote in message ... I don't understand what "dynamic ranges" are could you possibly explain further? To define a named range, activate from manu InsertNameDefine. Easiest is to define a static name - you select the range, and name it (type the name into Name field in toolbar, or into Name field in Define Name window. In Refers To field of Define Name window you see the formula like =Sheet1!$A$2:$A$4 When the name refers to more than 1 cell, it always returns a range. When the name refers to single cell, then it may be interpreted as both range or value - depending on call. A step further is to define name dynamically, i.e. the range, the name refers to (or returned value), depends on some condition (the number of entries, the position of active cell, etc.). How to do it, is up to your skill. An example with your data. I assume, that your table is on sheet Sheet1, names are in column A, hours are in column B, and A1:B1 are column headers - actiual data start from row 2. Define names Names=OFFSET(Sheet1!$A$1,1,,COUNTA(Sheet1!$A:$A)-1,1) Hours=OFFSET(Sheet1!$A$1,1,1,COUNTA(Sheet1!$A:$A)-1,1) Select range A1:B3, and create a chart of column type Right-click on chart, ans select Source Data - activate Series tab. In 'Values' field, you see Sheet1!$B$2:$B$3 Replace it with Sheet1!Hours In 'Categories (X) axis labels' field, you see Sheet1!$A$2:$A$3 Replace it with Sheet1!Names Close Source Date window (press OK) Now, when you add a new name into table, or delete some, the graph is adjusting immediately. NB! The way the name is defined assumes, that there never are any gaps (empty rows) in table. When you add new names, add them to next row at bottom. When you delete some entry, delete the entire row. Arvi Laanemets |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple Date Display Question | Excel Discussion (Misc queries) | |||
Cut and Paste Question for an Excel Guru | Excel Discussion (Misc queries) | |||
Excel Charts Linked to Spreadsheets | Charts and Charting in Excel | |||
Hints And Tips For New Posters In The Excel Newsgroups | Excel Worksheet Functions | |||
Simple question | Excel Discussion (Misc queries) |