Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Hi
use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
When I try this, I get a "Invalid Name' error in Excel - i can use built in
function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Hi
where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Thanks again - I originally placed it in Sheet1 object instead of a New
Module P.S. I read your note for listing User Defined Functions, but I don't know how to "see" the Function Wizard list - can you help me even more? Thanks "Frank Kabel" wrote in message ... Hi where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Here's a bonus question: Thanks to your tip, I can invoke a User Defined
Function to populate a cell! What I'd really love to do additionally is invoke a User Defined function as part of formula based custom Data Validation - when I try this on a UDF that works great as a formula cell value, I get a "can't find named range" error - i.e. the Data Validation dialog is not understanding that the name of my function is a user defined function - I can enter built-in function names, or named cells, but (so far) I can't enter a user defined function Thanks again "Frank Kabel" wrote in message ... Hi where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Hi
AFAIK you can't use UDFs within Data Validation. Just an Excel restriction! -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Here's a bonus question: Thanks to your tip, I can invoke a User Defined Function to populate a cell! What I'd really love to do additionally is invoke a User Defined function as part of formula based custom Data Validation - when I try this on a UDF that works great as a formula cell value, I get a "can't find named range" error - i.e. the Data Validation dialog is not understanding that the name of my function is a user defined function - I can enter built-in function names, or named cells, but (so far) I can't enter a user defined function Thanks again "Frank Kabel" wrote in message ... Hi where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Thanks - I'll stop spinning my wheels on that one!!!
"Frank Kabel" wrote in message ... Hi AFAIK you can't use UDFs within Data Validation. Just an Excel restriction! -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Here's a bonus question: Thanks to your tip, I can invoke a User Defined Function to populate a cell! What I'd really love to do additionally is invoke a User Defined function as part of formula based custom Data Validation - when I try this on a UDF that works great as a formula cell value, I get a "can't find named range" error - i.e. the Data Validation dialog is not understanding that the name of my function is a user defined function - I can enter built-in function names, or named cells, but (so far) I can't enter a user defined function Thanks again "Frank Kabel" wrote in message ... Hi where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Hi Frank, I believe, however, that you can use a data validation formula that refers to a cell that uses the UDF. --- Regards, Norman "Frank Kabel" wrote in message ... Hi AFAIK you can't use UDFs within Data Validation. Just an Excel restriction! -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Here's a bonus question: Thanks to your tip, I can invoke a User Defined Function to populate a cell! What I'd really love to do additionally is invoke a User Defined function as part of formula based custom Data Validation - when I try this on a UDF that works great as a formula cell value, I get a "can't find named range" error - i.e. the Data Validation dialog is not understanding that the name of my function is a user defined function - I can enter built-in function names, or named cells, but (so far) I can't enter a user defined function Thanks again "Frank Kabel" wrote in message ... Hi where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use a VBA function I write myself in a formula?
Hi Norman
correct. This would be a workaround - just forgot it :-) -- Regards Frank Kabel Frankfurt, Germany "Norman Jones" schrieb im Newsbeitrag ... Hi Frank, I believe, however, that you can use a data validation formula that refers to a cell that uses the UDF. --- Regards, Norman "Frank Kabel" wrote in message ... Hi AFAIK you can't use UDFs within Data Validation. Just an Excel restriction! -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Here's a bonus question: Thanks to your tip, I can invoke a User Defined Function to populate a cell! What I'd really love to do additionally is invoke a User Defined function as part of formula based custom Data Validation - when I try this on a UDF that works great as a formula cell value, I get a "can't find named range" error - i.e. the Data Validation dialog is not understanding that the name of my function is a user defined function - I can enter built-in function names, or named cells, but (so far) I can't enter a user defined function Thanks again "Frank Kabel" wrote in message ... Hi where did you put this code?. It has to go in a standard module (see the link I provided to you) -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... When I try this, I get a "Invalid Name' error in Excel - i can use built in function and named cells fine Is there some sort of subtle scoping/fully qualified name" issue "Frank Kabel" wrote in message ... Hi use a macro like public function my_function() my_function=1234 end function and in a cell type: =MY_FUNCTION() See: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Regards Frank Kabel Frankfurt, Germany "David Laub" schrieb im Newsbeitrag ... Can I use a VBA function I write myself in a formula? It appears to be impossibe... Thanks David Laub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to write a function formula | Excel Discussion (Misc queries) | |||
how do you write format results of a function within a function? | Excel Worksheet Functions | |||
i need to write an IF function formula, how? | New Users to Excel | |||
How do I write a IF function formula? | New Users to Excel | |||
how do I write a vlookup function within an iserror function so t. | Excel Worksheet Functions |