excel - 办公脚本中的自定义功能?
问题描述
在 Excel VBA 中,我创建了以下自定义函数。是否可以在 Excel 脚本中复制它?
Function ColorSum(myrange As Range, mycolorindex As Integer) As Double
Dim c As Range
On Error Resume Next
For Each c In myrange.Cells
If c.Interior.ColorIndex = mycolorindex Then _
ColorSum = ColorSum + c.Value
Next
End Function
解决方案
目前,您无法使用 Office 脚本创建自定义函数。要在我们的规划过程中考虑此功能请求,您可以在我们的用户语音页面上添加请求。
谢谢 - Office 脚本团队
推荐阅读
- excel - 需要在创建后立即激活文本框而不调用其名称
- mongodb - MongoDB 从其他集合中获取数组中最常用的类别以及计数
- flutter - 例外:无法运行“adb”,请检查您的 Android SDK 安装和 ANDROID_SDK_ROOT
- java - 杰克逊反序列化对象以列出
- validation - 选择字段验证
- html - 如何修复 SVG 上的渐变色
- python - 如何配置while循环以在列表中存在非零值时运行
- python - 更快的 SciPy 优化
- javascript - 在从 mysql 获取数据之前隐藏文本框
- python - 在 python 中对 CURL 使用请求