你好 ? 1.創(chuàng)建一個模塊: 在SHEET上,右鍵-》查看代碼。選中“模塊”-》插入模塊。2.寫代碼:Option Explicit Dim StrNO(19) As String Dim Unit(8) As String Dim StrTens(9) As StringPublic Function NumberToString(Number As Double) As String ? ?Dim Str As String, BeforePoint As String, AfterPoint As String, tmpStr As String ? ?Dim Point As Integer ? ?Dim nBit As Integer ? ?Dim CurString As String ? ?Dim nNumLen As Integer ? ?Dim T As String ? ?Call Init ? ?Str = CStr(Round(Number, 2)) ? ? Str = Number ? ?If InStr(1, Str, .) = 0 Then ? ? ? ?BeforePoint = Str ? ? ? ?AfterPoint = ? ?Else ? ? ? ?BeforePoint = Left(Str, InStr(1, Str, .) - 1) ? ? ? ?T = Right(Str, Len(Str) - InStr(1, Str, .)) ? ? ? ?If Len(T) < 2 Then AfterPoint = Val(T) * 10 ? ? ? ?If Len(T) = 2 Then AfterPoint = Val(T) ? ? ? ?If Len(T) > 2 Then AfterPoint = Val(Left(T, 2)) ? ?End If ? ?If Len(BeforePoint) > 12 Then ? ? ? ?NumberToString = Too Big. ? ? ? ?Exit Function ? ?End If ? ?Str = ? ?Do While Len(BeforePoint) > 0 ? ? ? ?nNumLen = Len(BeforePoint) ? ? ? ?If nNumLen Mod 3 = 0 Then ? ? ? ? ? ?CurString = Left(BeforePoint, 3) ? ? ? ? ? ?BeforePoint = Right(BeforePoint, nNumLen - 3) ? ? ? ?Else ? ? ? ? ? ?CurString = Left(BeforePoint, (nNumLen Mod 3)) ? ? ? ? ? ?BeforePoint = Right(BeforePoint, nNumLen - (nNumLen Mod 3)) ? ? ? ?End If ? ? ? ?nBit = Len(BeforePoint) / 3 ? ? ? ?tmpStr = DecodeHundred(CurString) ? ? ? ?If (BeforePoint = String(Len(BeforePoint), 0) Or nBit = 0) And Len(CurString) = 3 Then ? ? ? ? ? ?If CInt(Left(CurString, 1)) <> 0 And CInt(Right(CurString, 2)) <> 0 Then ? ? ? ? ? ? ? ?tmpStr = Left(tmpStr, InStr(1, tmpStr, Unit(4)) %2B Len(Unit(4))) %26 Unit(8) %26 %26 Right(tmpStr, Len(tmpStr) - (InStr(1, tmpStr, Unit(4)) %2B Len(Unit(4)))) ? ? ? ? ? ?Else If CInt(Left(CurString, 1)) <> 0 And CInt(Right(CurString, 2)) = 0 Then ? ? ? ? ? ? ? ?tmpStr = Unit(8) %26 %26 tmpStr ? ? ? ? ? ?End If ? ? ? ?End If ? ? ? ?If nBit = 0 Then ? ? ? ? ? ?Str = Trim(Str %26 %26 tmpStr) ? ? ? ?Else ? ? ? ? ? ?Str = Trim(Str %26 %26 tmpStr %26 %26 Unit(nBit)) ? ? ? ?End If ? ? ? ?If Left(Str, 3) = Unit(8) Then Str = Trim(Right(Str, Len(Str) - 3)) ? ? ? ?If BeforePoint = String(Len(BeforePoint), 0) Then Exit Do ? ? ? ?***.print Str ? ?Loop ? ?BeforePoint = Str ? ?If Len(AfterPoint) > 0 Then ? ? ? ?AfterPoint = Unit(8) %26 %26 Unit(7) %26 %26 DecodeHundred(AfterPoint) %26 %26 Unit(5) ? ?Else ? ? ? ?AfterPoint = Unit(5) ? ?End If ? ?NumberToString = BeforePoint %26 %26 AfterPoint End Function Private Function DecodeHundred(HundredString As String) As String ? ?Dim tmp As Integer ? ?If Len(HundredString) > 0 And Len(HundredString) <= 3 Then ? ? ? ?Select Case Len(HundredString) ? ? ? ? ? ?Case 1 ? ? ? ? ? ? ? ?tmp = CInt(HundredString) ? ? ? ? ? ? ? ?If tmp <> 0 Then DecodeHundred = StrNO(tmp) ? ? ? ? ? ?Case 2 ? ? ? ? ? ? ? ?tmp = CInt(HundredString) ? ? ? ? ? ? ? ?If tmp <> 0 Then ? ? ? ? ? ? ? ? ? ?If (tmp < 20) Then ? ? ? ? ? ? ? ? ? ? ? ?DecodeHundred = StrNO(tmp) ? ? ? ? ? ? ? ? ? ?Else ? ? ? ? ? ? ? ? ? ? ? ?If CInt(Right(HundredString, 1)) = 0 Then ? ? ? ? ? ? ? ? ? ? ? ? ? ?DecodeHundred = StrTens(Int(tmp / 10)) ? ? ? ? ? ? ? ? ? ? ? ?Else ? ? ? ? ? ? ? ? ? ? ? ? ? ?DecodeHundred = StrTens(Int(tmp / 10)) %26 - %26 StrNO(CInt(Right(HundredString, 1))) ? ? ? ? ? ? ? ? ? ? ? ?End If ? ? ? ? ? ? ? ? ? ?End If ? ? ? ? ? ? ? ?End If ? ? ? ? ? ?Case 3 ? ? ? ? ? ? ? ?If CInt(Left(HundredString, 1)) <> 0 Then ? ? ? ? ? ? ? ? ? ?DecodeHundred = StrNO(CInt(Left(HundredString, 1))) %26 %26 Unit(4) %26 %26 DecodeHundred(Right(HundredString, 2)) ? ? ? ? ? ? ? ?Else ? ? ? ? ? ? ? ? ? ?DecodeHundred = DecodeHundred(Right(HundredString, 2)) ? ? ? ? ? ? ? ?End If ? ? ? ? ? ?Case Else ? ? ? ?End Select ? ?End IfEnd Function Private Sub Init() ? ?If StrNO(1) <> One Then ? ? ? ?StrNO(1) = One ? ? ? ?StrNO(2) = Two ? ? ? ?StrNO(3) = Three ? ? ? ?StrNO(4) = Four ? ? ? ?StrNO(5) = Five ? ? ? ?StrNO(6) = Six ? ? ? ?StrNO(7) = Seven ? ? ? ?StrNO(8) = Eight ? ? ? ?StrNO(9) = Nine ? ? ? ?StrNO(10) = Ten ? ? ? ?StrNO(11) = Eleven ? ? ? ?StrNO(12) = Twelve ? ? ? ?StrNO(13) = Thirteen ? ? ? ?StrNO(14) = Fourteen ? ? ? ?StrNO(15) = Fifteen ? ? ? ?StrNO(16) = Sixteen ? ? ? ?StrNO(17) = Seventeen ? ? ? ?StrNO(18) = Eighteen ? ? ? ?StrNO(19) = Nineteen ? ? ? ?StrTens(1) = Ten ? ? ? ?StrTens(2) = Twenty ? ? ? ?StrTens(3) = Thirty ? ? ? ?StrTens(4) = Forty ? ? ? ?StrTens(5) = Fifty ? ? ? ?StrTens(6) = Sixty ? ? ? ?StrTens(7) = Seventy ? ? ? ?StrTens(8) = Eighty ? ? ? ?StrTens(9) = Ninety ? ? ? ?Unit(1) = Thousand 材?熌?? ? ? ? ?Unit(2) = Million 材?熌?? ? ? ? ?Unit(3) = Billion 材?熌?? ? ? ? ?Unit(4) = Hundred ? ? ? ?Unit(5) = Only ? ? ? ?Unit(6) = Point ? ? ? ?Unit(7) = Cents ? ? ? ?Unit(8) = And ? ?End If End Sub保存此代碼到本地3.模塊中已經(jīng)定義了函數(shù)名稱:NumberToString直接當作EXCEL本地函數(shù)使用,例如在A1=7,在B1中輸入=NumberToString(A1)就可以拉!
老師,我的表格里面有文字也有數(shù)字,我怎么能把文字去掉只保留數(shù)字(批量處理)
老師您好!Excel中輸入數(shù)字顯示不了,把單元格數(shù)字格式設置為文本格式后,怎么樣再轉為數(shù)字格式
WPS中怎樣把word中的表格直接轉換到excel中呢?既有文字也有數(shù)字
老師,你好!在Excel表格中,一個單元格,前面有字,后面跟著數(shù)字,如何把這個單元格里面的數(shù)字變成大寫!
老師你好,怎樣把excel表格里面的數(shù)字轉換成英文字母?
不是說交易性金融資產(chǎn)的賬價是90嗎?分錄那里為什么寫80,公允價值變動的10為什么不在分錄中體現(xiàn)出來?我認為分錄那里交易性金融資產(chǎn)應該寫90。
去年的季度所得稅申報表的從業(yè)人員數(shù)量填錯了,今年匯算清繳已結束。還能修改去年的季度所得稅申報表嗎?
24年的工資申報表填錯了,匯算清繳以后還能對24年的工資進行更正嗎?
你好老師 個體戶經(jīng)營超市多家超市怎么核算成本 收入
稅務師考試有獎學金嗎??
退貨并紅沖發(fā)票,先做賬紅沖發(fā)票,在借庫存貸主營業(yè)成本是吧
老師,請問一下工商年報的時候里面的社保信息比如說養(yǎng)老保險的人數(shù)應該是填12月份的人數(shù)是吧?主要是前面幾個月的人數(shù)不一樣。
底薪3600,全勤200元,全勤26天,出勤24天,休息了3三天,公司用3800?30??24
您好,老師,新開的酒店,一般納稅人,如果低值易耗品選擇方法是一次性攤銷,那像布草,餐具這些低值易耗品是不是一次性就計入費用或成本了,當月費用會不會比較高?還有什么價格的定低值易耗品,什么價格的定周轉材料?怎么快速整理不容易記賬混亂重復,日常在記賬時怎么來界定這兩種。 第二個問題是不是只要體現(xiàn)在財務系統(tǒng),不管是幾級科目,只要叫低值易耗品,就一次性攤銷進費用或成本?
這個題是不是有問題?答案和這個牛頭不對馬嘴呀?計提工資還有個稅還有其他應收款個人社保公積金……
好復雜哦,沒有簡單的函數(shù)公式的嗎?我就是轉換成一個英文字母就好了
我現(xiàn)在表格有 1 0 我只需要把這兩個數(shù)據(jù)變成兩個不同的英文字母就好了
這個沒有,要是替換同一個字母,可以用查找替換。
替換成兩個字母沒有辦法嗎?只有用你第一個發(fā)來的嗎?
是的。。就是這個公式。