LibreOffice 的宏来总结带下划线的数据

问题描述 投票:0回答:0

我正在尝试使 this excel 宏适应 Libreoffice,它将用于对标记为下划线的单元格中的数据求和。

Option VBASupport 1
Option Compatible

Function SumUnderline(optional WorkRng As Range)
'Update 20220516

Dim Rng As Range
Dim xSum As Double
For Each Rng In WorkRng
    If Rng.Font.Underline Then
        xSum = xSum + Rng.Value
    End If
Next
SumUnderline = xSum

End Function

执行时出现错误数据类型不匹配.

请帮助修复它。

拥有与 Excel 和 LibreOffice 兼容的工作宏。

Error

excel vba libreoffice
© www.soinside.com 2019 - 2024. All rights reserved.