ExcelFans

[清者自清]

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
#小写转大写的函数

Function DX(M)
  
'将小写数字转化为大写金额
= Int(Round(100 * Abs(M)) / 100)
= Round(100 * Abs(M) + 0.00001- y * 100
= Round((j / 10 - Int(j / 10)) * 10)
= IIf(y < 1"", Application.Text(y, "[DBNum2]"& "")
= IIf(j > 9.4, Application.Text(Int(j / 10), "[DBNum2]"& ""IIf(y < 1""IIf(f > 0.4"""")))
= IIf(f < 1"", Application.Text(Round(f, 0), "[DBNum2]"& "")
DX 
= IIf(Abs(M) < 0.005""IIf(M < 0"" & A & b & c, A & b & c))
End Function

#统计特定字符个数:

Public Function JISUAN(H_text_source As String, H_special As StringAs Integer
    
'统计 H_text_source 里有几个 H_special
    On Error GoTo LL
    
Dim I As Integer
    JISUAN 
= 0
    
For I = 1 To 20 'Len(H_text_source)
      If WorksheetFunction.Find(H_special, H_text_source) Then
           H_text_source 
= Right(H_text_source, (Len(H_text_source) - WorksheetFunction.Find(H_special, H_text_source)))
           JISUAN 
= JISUAN + 1
      
End If
    
Next
LL:
End Function

posted on 2008-02-27 17:11  ExcelFans  阅读(1705)  评论(0编辑  收藏  举报