掌握Excel条件格式设置,提升数据分析的效率与精准度
614
2022-10-07
替自定义函数设置可选参数
本文为《别怕,Excel VBA其实很简单(第3版)》随书问题参-
Function JoinText(Rng As Range, Optional Txt As String = ",") As String Dim c As Range For Each c In Rng JoinText = JoinText & c.Value & Txt Next c JoinText = Left(JoinText, Len(JoinText) - 1)End Function
或者
Function JoinText(Rng As Range, Optional Txt As Variant) As String Dim c As Range If IsMissing(Txt) Then Txt = "," For Each c In Rng JoinText = JoinText & c.Value & Txt Next c JoinText = Left(JoinText, Len(JoinText) - 1)End Function
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。