山东轻工财经网

当前位置:首页 >> 外汇

外汇

excel人民币金额大小写转换-excel表格金额大小写转换公式设置

2022-01-21 05:01:43外汇
如何在Excel中将人民币大写金额转换成小写金额?按如下步骤:选定大写形式的单元格->右键点击,选择“设定单元格格式”->特殊->右侧选择“中文小写数字”->确

如何在Excel中将人民币大写金额转换成小写金额?

如何在Excel中将人民币大写金额转换成小写金额?

按如下步骤:选定大写形式的单元格->右键点击,选择“设定单元格格式”->特殊->右侧选择“中文小写数字”->确定,就OK了

excel表格金额大小写转换公式设置

excel表格金额大小写转换公式设置

把“(大写):”调整到前面单元格,在需要填入金额的单元格中写入下面公式:=SUBSTITUTE(IF(N12,IF(N12<0,"负",)&TEXT(TRUNC(N12),"[dbnum2]g/通用格式元;[dbnum2]g/通用格式元;")&TEXT(RIGHT(RMB(N12),2),"[>9][dbnum2]0角0分;[>][dbnum2]0分;整"),"零元"),"零分","整")单元格格式调整为左对齐,注意的是公式中“N13”根据实际需写入大写数字的单元格修改。

怎么将人民币大写在excel 中转换成小写,使用什么公式

怎么将人民币大写在excel 中转换成小写,使用什么公式

据我所知,公式还不能解决这个问题,下面给出EXCEL VBA解决方法:1、打开EXCEL 表,按下ALT + F11 ,双击 “ThisWorkbook”,如下图:2、按下 F5,静待代码运行结束,效果如下:3、需要注意的几个问题:①,运行代码前,请先备份好数据,代码会占用B列,若你原B列有数据,建议插入空列。②,大写按照标准来的,即万前必须有填,例如“贰拾零万”,不是“贰拾万”。③,代码以“元”来区分小写后的小数点,必须要有哟。Sub DaxieToXiao()    Dim XiaoNub As String    Dim i As Integer    For i = 2 To 100     If Cells(i, 1) <> "" Then        Dim n As Integer        For n = 1 To Len(Cells(i, 1))            If Right(Left(Cells(i, 1), n), 1) = "零" Then               XiaoNub = XiaoNub & "0"            End If            If Right(Left(Cells(i, 1), n), 1) = "壹" Then               XiaoNub = XiaoNub & "1"            End If            If Right(Left(Cells(i, 1), n), 1) = "贰" Then               XiaoNub = XiaoNub & "2"            End If            If Right(Left(Cells(i, 1), n), 1) = "叁" Then               XiaoNub = XiaoNub & "3"            End If            If Right(Left(Cells(i, 1), n), 1) = "肆" Then               XiaoNub = XiaoNub & "4"            End If            If Right(Left(Cells(i, 1), n), 1) = "伍" Then               XiaoNub = XiaoNub & "5"            End If            If Right(Left(Cells(i, 1), n), 1) = "陆" Then               XiaoNub = XiaoNub & "6"            End If            If Right(Left(Cells(i, 1), n), 1) = "柒" Then               XiaoNub = XiaoNub & "7"            End If            If Right(Left(Cells(i, 1), n), 1) = "捌" Then               XiaoNub = XiaoNub & "8"            End If            If Right(Left(Cells(i, 1), n), 1) = "玖" Then               XiaoNub = XiaoNub & "9"            End If            If Right(Left(Cells(i, 1), n), 1) = "元" Then               XiaoNub = XiaoNub & "."            End If        Next n        Cells(i, 2) = XiaoNub        XiaoNub = ""     End If    Next iEnd Sub