LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default can use a user-defined function in chart value source?

As you've discovered, that's not how it works. Your FeedData is a user
defined function (UDF), not a formula that links to a range or name in the
worksheet.

To name a range, go to Insert menu Names Define.

Type a name in the Name box:
FeedData

Enter a formula in the Refers To box:
=OFFSET(Data1!R4C1,0,0,72,1)

Click Add, and repeat for additional names you need to define.

Return to the chart's Source Data dialog, Series tab, and where appropriate
enter:
=Data1!FeedData

If 'star' and 'number' are used in the formula (I don't see how, because
they were absent in your ersatz UDF), use them in the offset formula, e.g.:
=OFFSET(Data1!R4C1,Data1!R1C1,Data1!R2C1,Data1!R3C 1,1)

For more on this topic, see the examples and links he
http://peltiertech.com/Excel/Charts/Dynamics.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Gw" wrote in message
...
For a simple example, I write a function as below:
Function FeedData(star, number) As Range
FeedData = Application.WorksheetFunction.Offset(Data1!r4c1, 0, 0, 72, 1)
End Function

and write "=FeedData(0,1)" as chart value source, but it doesn't work yet.
Do you think where need to correct? Thanks

Gw

"Jon Peltier" wrote:

The only formula allowed here is a link to a worksheet range or a defined
name. You can make the worksheet range as fancy with formulas as you
want,
and you can define fairly intricate names as well. I prefer to do the
fancy
calculations in the worksheet, and save the names for definitions of
dynamic
worksheet ranges.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Gw" wrote in message
...
If can, would you please show me a example on how to write it. Thanks

"Gw" wrote:

Dear MVPs

When I draw a line chart by wizard, it asks me to input the value
source
for
a serie.
Actually I need do some filtering about that source, can I use a
self-defined function
here, but not only those excel functions?









 
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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
i cant see my user defined functions in function list delmac Excel Worksheet Functions 1 August 11th 06 10:23 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
user defined function help Floyd Steele Excel Worksheet Functions 1 February 2nd 06 10:47 PM
how to move user defined function Grant Excel Worksheet Functions 1 November 17th 04 06:38 PM


All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"