How exactly do I create "Dynamic Named Ranges"?

I'm trying to create a "Dynamic Named Range" in Excel so I can populate an X/Y values table inside of it in Java. I've seen tutorials, but I still don't get it. I know I have to use the =OFFSET() function, but where? Within the chart? Somewhere else?

I'm sorry, it's because my Excel level sucks... I haven't used it for a looong time.


The easiest way is to create a named range (Insert, Name, Define in xl2003). Enter myRange (or any other name) as the name to define, and the formula in the "refers to" box.
To help you build the formula, you cand read this, this and this.
You can test if your named range works by using entering in a cell =count(myRange) or a similar formula.

Finally, you build your chart using the range name as usual, but you replace the =Sheet1!$C$4:$C$10 in the data range by =myRange.