Can we use UDF in excel custom validation
I have added the UDF in my excel template(C#) using excel addin classlibrary,but i can not use that function in custom validation when i use the UDF in custom validation of excel(data->validat开发者_JS百科ion->dropdownlist(custom))i get an error as:
You can not use references to other worksheeta or workbooks for data validation criteria.
Is there any solution to this problem? Can we use UDF in custom validation of excel?
I had forgotten about the UDF-in-data validation restriction. I think that restriction has been removed in Excel 2010. Otherwise AFAIK the only way round it is to wrap the UDF in a Defined Name in the xlt (create a Defined Name in the xlt that references the UDF: NameValidate=MyUDF())
精彩评论