Excel User defined Functions

wahmed

Board Regular
Joined
Jun 28, 2010
Messages
66
Hello all,

I would like to make some user defined functions in Excel vba, I have managed to make that functions but problem is that they dont show help in entering data like excel own functions show.

Like when we enter =Vlookup( in excel then it start showing help menu which show Lookup_value,Table_array,Col_index etc which make easy for user to enter data as per function's requirement. but in User Defined function excel dot show any help like that which make very odd to remember each argument that which was for which purpose....

Could any one help me about that ?

Regards

Wahmed
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hello all,

I would like to make some user defined functions in Excel vba, I have managed to make that functions but problem is that they dont show help in entering data like excel own functions show.

Like when we enter =Vlookup( in excel then it start showing help menu which show Lookup_value,Table_array,Col_index etc which make easy for user to enter data as per function's requirement. but in User Defined function excel dot show any help like that which make very odd to remember each argument that which was for which purpose....

Could any one help me about that ?

Regards

Wahmed


The routines should be in a module ( thats not the Thisworkbook or sheet1 etc ) Module1 or MyMod or MyStuff etc

and use the Public keyword as in
"Sub GetTime(..." becomes "Public Sub GetTiime(..."


and its the same for functions
 
Upvote 0
Dear Charles,

thanks for your message but sorry it is not working :(

Please help me

regards

wahmed

The routines should be in a module ( thats not the Thisworkbook or sheet1 etc ) Module1 or MyMod or MyStuff etc

and use the Public keyword as in
"Sub GetTime(..." becomes "Public Sub GetTiime(..."


and its the same for functions
 
Upvote 0
Hello all,

I would like to make some user defined functions in Excel vba, I have managed to make that functions but problem is that they dont show help in entering data like excel own functions show.

Like when we enter =Vlookup( in excel then it start showing help menu which show Lookup_value,Table_array,Col_index etc which make easy for user to enter data as per function's requirement. but in User Defined function excel dot show any help like that which make very odd to remember each argument that which was for which purpose....

Could any one help me about that ?

Regards

Wahmed

Try this out. Open the VBA screen then dispaly the immediate window (use Ctrl + G if not visible) then add this into the immedaite window and press Enter, Replace the Function name in Red First. Then go to the Excel front end select to use the Function and you should see the description..

Application.MacroOptions Macro:="nodupsArray", Description:="This is my UDF and it's really good!"
 
Last edited:
Upvote 0
Dear Charles,

Here is Copy of a simple function I am doing.
===================

Public Function DATEDIFF(start_date As Date, End_Date As Date) As Double

DATEDIFF = (End_Date - start_date)

End Function

====================

I want that in Excel when I enter formula as =DATEDIFF( then it automatically show small help menu for (Start_Date,End_Date) which make simple for user which input function required...

thats it.

regards

Wahmed
 
Upvote 0
I think the real issue is that function DATEDIFF in a built in excel function CHANGE the Name if you are using 2007 you do get a menu BUT YOUR OWN FUNCTION Cannot be called DATEDIFF
 
Upvote 0
Dear Charles,

Lets change function name to DATECOUNT but you still will not get results required.

regards

wahmed
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top