输入货币数字怎么变成大写

在需要输出格式中输入公式=IF(A2<0,"负","")&TEXT(TRUNC(ABS(ROUND(A2,2))),"[DBNum2]")&"元"&IF(ISERR(FIND(".",ROUND(A2,2))),"",TEXT(RIGHT(TRUNC(ROUND(A2,2)*10)),"[DBNum2]"))&IF(ISERR(FIND(".0",TEXT(A2,"0.00"))),"角","")&IF(LEFT(RIGHT(ROUND(A2,2),3))=".",TEXT(RIGHT(ROUND(A2,2)),"[DBNum2]")&"分","整"),A2为货币数字格

材料/工具:word20161、打开相关的word文档,比如要将金额数字15263转换为大写数字。2、点击插入菜单按钮,选择“数字”按钮。3、出现“数字”对话框。4、在数字输入框中输入数字15263,在“数字类型”中点击向下的三角形选中“壹,贰,叁 ...”,点击“确定”。5、则金额数字的大写形式就显示在文档中了。

设置方法:1、输入所需要的阿拉伯数字,并选中;2、单击插入----编号按钮;3、弹出编号对话框,在编号类型列表中,选择"壹,贰,叁……"选项即可,如图所示;4、单击"确定"按钮,即可实现将阿拉伯数字转化为大写金额形式。

选中数字后,选择插入菜单里的数字命令,在数字类型里选择壹贰叁类型

选中小写数字,在插入里选择数字,再选择大写的就行了

假如数据在A1栏,在你需要的单元格输入:=IF(A1=INT(A1),NUMBERSTRING(INT(A1),2)&"元整",IF(A1*10=INT(A1*10),NUMBERSTRING(INT(A1),2)&"元"&NUMBERSTRING(INT(A1*10)-INT(A1)*10,2)&"角整",IF(ROUNDDOWN(A1*10-INT(A1)*10,0)=0,NUMBERSTRING(INT(A1),2)&"元零"&NUMBERSTRING(ROUND(A1*100-INT(A1*10)*10,0),2)&"分",NUMBERSTRING(INT(A1),2)&"元"&NUMBERSTRING(INT(A1*10)-INT(A1)*10,2)&"角"&NUMBERSTRING(ROUND(A1*100-INT(A1*10)*10,0),2)&"分")))或输入:=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(TEXT(INT(A1),"[dbnum2];; ")&TEXT(MOD(A1*100,100),"[>9][dbnum2]元0角0分;[=0]元整;[dbnum2]元零0分"),"零分","整")," 元零",)," 元",)希望对你有帮助

我们在使用EXCEL做账时,经常要将货币用中文大写表示,将下列公式复制到单元格,在A1单元格输入货币数字,公式所在单元格就会自动转换成大写中文货币形式,非常简便使用。在实际使用中,可以将公式中的A1改换成任意指定的单元格。=SUBSTITUTE(SUBSTITUTE(TEXT(TRUNC(FIXED(A1)),"[dbnum2]G/通用格式元;负[dbnum2]G/通用格式元;"&IF(A1>-0.5%,,"负"))&TEXT(RIGHT(FIXED(A1),2),"[dbnum2]0角0分;;"&IF(ABS(A1)>1%,"整",)),"零角",IF(ABS(A1)<1,,"零")),"零分","整")参考blog文章:http://mymz.blog.hexun.com/24997382_d.html

1、打开需要操作的excel表格,首先在A1单元格内输入需要转换成大写金额的数字,例如数字“879”。2、然后在B1单元格内输入“=”符号,用来引用计算数值的单元格。3、继续输入完整的转换公式:=SUBSTITUTE(SUBSTITUTE(IF(-RMB(A1,2),TEXT(A1,";负")&TEXT(INT(ABS(A1)+0.5%),"[dbnum2]G/通用格式元;;")&TEXT(RIGHT(RMB(A1,2),2),"[dbnum2]0角0分;;整"),),"零角",IF(A1^2<1,,"零")),"零分","整")。4、最后点击回车按键,即可生成公式的计算结果:数字“879”被转换成为“捌佰柒拾玖元整”。

方法一:右键单元格,设置单元格格式-数字-特殊-中文大写数字方法二:左键单元格,在上方输入栏输入以下文本=SUBSTITUTE(SUBSTITUTE(IF(A1<0,"负","")&TEXT(TRUNC(ABS(ROUND(A1,2))),"[DBNum2]")&"元"&IF(ISERR(FIND(".",ROUND(A1,2))),"",TEXT(RIGHT(TRUNC(ROUND(A1,2)*10)),"[DBNum2]"))&IF(ISERR(FIND(".0",TEXT(A1,"0.00"))),"角","")&IF(LEFT(RIGHT(ROUND(A1,2),3))=".",TEXT(RIGHT(ROUND(A1,2)),"[DBNum2]")&"分",IF(ROUND(A1,2)=0,"","整")),"零元零",""),"零元","")

选中所有需要使用大写数字的单元格,单击鼠标右键,在弹出的快捷菜单中执行“设置单元格格式”命令,在弹出的“单元格格式”对话框中选择“数字”选项卡,在“分类”列表框中选择“特殊”选项,然后在右侧的“类别”列表框中选中“人民币大写”,单击“确定”按钮。

别人的,你试试...=SUBSTITUTE(SUBSTITUTE(IF(A1<0,"负","")&TEXT(TRUNC(ABS(ROUND(A1,2))),"[DBNum2]")&"元"&IF(ISERR(FIND(".",ROUND(A1,2))),"",TEXT(RIGHT(TRUNC(ROUND(A1,2)*10)),"[DBNum2]"))&IF(ISERR(FIND(".0",TEXT(A1,"0.00"))),"角","")&IF(LEFT(RIGHT(ROUND(A1,2),3))=".",TEXT(RIGHT(ROUND(A1,2)),"[DBNum2]")&"分",IF(ROUND(A1,2)=0,"","整")),"零元零",""),"零元","")

操作步骤:1、在输入数字前先输入“V”;2、紧接着输入要变大写的数字;3、现在按下b键即可输入大写数字了。

在键盘中没有将数字直接变成大写的功能键,只有将英文之母改变成大写的键。但在excel中有一个功能,可以将写入的数字直接变成大写汉字。具体做法是,选中准备设置的行、列或者单元格,右键单击,点击浮动菜单中的设置单元格格式,在对话框中选择“数字”标签,“分类”中选择“特殊”,“类型”中选择“中文大写数字”,点击确定,今后在这个设置后的区域中输入的数字,会自动转换成大写数字

直接使用 鼠标右键 “自定义单元格格式”==》特殊==》中文大写即可。如果不满意,试试这:=NUMBERSTRING(1234567890,1)参数1可以修改 ,123456..是假设数字,可以改为单元格名称还不行就试试:=SUBSTITUTE(SUBSTITUTE(TEXT(TRUNC(FIXED(A1)),"[>0][dbnum2];[<0]负[dbnum2];;")&TEXT(RIGHT(FIXED(A1),2),"元[dbnum2]0角0分;;"&IF(ABS(A1)>1%,"元整",)),"零角",IF(ABS(A1)<1,,"零")),"零分","整")其中A1是假设数据的单元格。

在设置单元格格式里选择货币,如果想转为大写,选特殊--中文大写数字

直接使用鼠标右键“自定义单元格格式”==》特殊==》中文大写即可。如果不满意,试试这:=NUMBERSTRING(1234567890,1)参数1可以修改,123456..是假设数字,可以改为单元格名称还不行就试试:=SUBSTITUTE(SUBSTITUTE(TEXT(TRUNC(FIXED(A1)),"[>0][dbnum2];[<0]负[dbnum2];;")&TEXT(RIGHT(FIXED(A1),2),"元[dbnum2]0角0分;;"&IF(ABS(A1)>1%,"元整",)),"零角",IF(ABS(A1)<1,,"零")),"零分","整")其中A1是假设数据的单元格。

import java.text.*;import java.util.Scanner;/** * @作者:智鸱儿-zhichier * @version 1.0 己丑年八月初三-2009/09/21 */public class RenminbiZhuanhuan { /** * */ public RenminbiZhuanhuan() { // TODO Auto-generated constructor stub } /** * @param args */ public static void main(String[] args) { Scanner s=new Scanner(System.in); System.out.println("请输入你要转换的金额:"); double number=s.nextDouble(); String s1=zhuanhuan(new Double(number)); System.out.println("转换成大写后的金额是:"+s1); // TODO Auto-generated method stub } public static String zhuanhuan(Object ob){ String s=new DecimalFormat("#.00").format(ob); s=s.replaceAll("\\.", "");//将字符串中的"."去掉 char d[]={ '零', '一', '两', '三', '四', '五', '六', '七', '八', '九'}; String unit="仟佰拾兆仟佰拾亿仟佰拾万仟佰拾元角分"; int c=unit.length(); StringBuffer sb=new StringBuffer(unit); for(int i=s.length()-1;i>=0;i--){ sb.insert(c-s.length()+i,d[s.charAt(i)-0x30]); } s=sb.substring(c-s.length(),c+s.length()); s=s.replaceAll("零[仟佰拾]", "零"). replaceAll("零{2,}", "零"). replaceAll("零([兆万元Ԫ])", "$1"). replaceAll("零[角分]", ""); return s; }}希望对你有帮助!

代码如下:/** * 人民币转成大写 * * @param value * @return String */ public static String hangeToBig(double value) { char[] hunit = { '拾', '佰', '仟' }; // 段内位置表示 char[] vunit = { '万', '亿' }; // 段名表示 char[] digit = { '零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖' }; // 数字表示 long midVal = (long) (value * 100); // 转化成整形 String valStr = String.valueOf(midVal); // 转化成字符串 String head = valStr.substring(0, valStr.length() - 2); // 取整数部分 String rail = valStr.substring(valStr.length() - 2); // 取小数部分 String prefix = ""; // 整数部分转化的结果 String suffix = ""; // 小数部分转化的结果 // 处理小数点后面的数 if (rail.equals("00")) { // 如果小数部分为0 suffix = "整"; } else { suffix = digit[rail.charAt(0) - '0'] + "角" + digit[rail.charAt(1) - '0'] + "分"; // 否则把角分转化出来 } // 处理小数点前面的数 char[] chDig = head.toCharArray(); // 把整数部分转化成字符数组 char zero = '0'; // 标志'0'表示出现过0 byte zeroSerNum = 0; // 连续出现0的次数 for (int i = 0; i < chDig.length; i++) { // 循环处理每个数字 int idx = (chDig.length - i - 1) % 4; // 取段内位置 int vidx = (chDig.length - i - 1) / 4; // 取段位置 if (chDig[i] == '0') { // 如果当前字符是0 zeroSerNum++; // 连续0次数递增 if (zero == '0') { // 标志 zero = digit[0]; } else if (idx == 0 && vidx > 0 && zeroSerNum < 4) { prefix += vunit[vidx - 1]; zero = '0'; } continue; } zeroSerNum = 0; // 连续0次数清零 if (zero != '0') { // 如果标志不为0,则加上,例如万,亿什么的 prefix += zero; zero = '0'; } prefix += digit[chDig[i] - '0']; // 转化该数字表示 if (idx > 0) prefix += hunit[idx - 1]; if (idx == 0 && vidx > 0) { prefix += vunit[vidx - 1]; // 段结束位置应该加上段名如万,亿 } } if (prefix.length() > 0) prefix += '圆'; // 如果整数部分存在,则有圆的字样 return prefix + suffix; // 返回正确表示 }

import java.util.*;public class TestNum {public static void main(String[] args) { System.out.println("请输入要转化的数字?"); Scanner sc=new Scanner(System.in); String msg=sc.nextLine(); String[] str={"分","角","元","十","百","千","万","十","百","千","亿"}; String[] str1={"零","一","二","三","四","五","六","七","八","九","十"}; String[] s=msg.split("\\."); int j=0; char temp; int i; int p; for(i=s[0].length()+2,j=0;i>2;i--,j++){ temp=s[0].charAt(j); String ss=String.valueOf(temp); p=Integer.valueOf(ss); System.out.print(str1[p]+str[i-1]); } if(s.length>1){ for(i=s[1].length(),j=0;i>0;i--,j++){ temp=s[1].charAt(j); String ss=String.valueOf(temp); p=Integer.valueOf(ss); System.out.print(str1[p]+str[i-1]); } } }}调试成功!

你是不会写还是要别人帮你写哦??自己写哈我反正不的帮帮人写的不会就问.直接写会很不好的...

直接调chang()这个方法就行string ht1 = chang(Convert.ToDouble(234.45));public static string chang(double Digital) { //将小写金额转换成大写金额 String[] MyScale = { "分", "角", "圆", "拾", "佰", "仟62616964757a686964616fe58685e5aeb931333335323965", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟", "兆", "拾", "佰", "仟" }; String[] MyBase = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; String moneyStr = ""; bool isPoint = false; string moneyDigital = Digital.ToString(); if (moneyDigital.IndexOf(".") != -1) { moneyDigital = moneyDigital.Remove(moneyDigital.IndexOf("."), 1); isPoint = true; } for (int i = moneyDigital.Length; i > 0; i--) { int MyData = Convert.ToInt16(moneyDigital[moneyDigital.Length - i].ToString()); moneyStr += MyBase[MyData]; if (isPoint == true) { moneyStr += MyScale[i - 1]; } else { moneyStr += MyScale[i + 1]; } } while (moneyStr.Contains("零零")) moneyStr = moneyStr.Replace("零零", "零"); moneyStr = moneyStr.Replace("零亿", "亿"); moneyStr = moneyStr.Replace("亿万", "亿"); moneyStr = moneyStr.Replace("零万", "万"); moneyStr = moneyStr.Replace("零仟", "零"); moneyStr = moneyStr.Replace("零佰", "零"); moneyStr = moneyStr.Replace("零拾", "零"); while (moneyStr.Contains("零零")) moneyStr = moneyStr.Replace("零零", "零"); moneyStr = moneyStr.Replace("零圆", "圆"); moneyStr = moneyStr.Replace("零角", ""); moneyStr = moneyStr.Replace("零分", ""); moneyStr = moneyStr + "整"; return moneyStr; }

#include #include #include using namespace std;const int INT_ONLY = 1;const int SMALL_ONLY = 2;string getNum() {string s;cout << "请输入一个数字:" << endl;cin >> s;cin.clear();return s;}bool checkNum(string s) {double d = atof(s.c_str());if(d > 0) {return true;}return false;}string roundString(string s) {double d = atof(s.c_str());int dec, sign;s = fcvt(d, 2, &dec, &sign);if(s.length() > 10) {cout << "整数不62616964757a686964616fe4b893e5b19e31333365656536能过亿!" << endl;return "";}return s;}string formatChinese(int flag, string s) {int sLength = s.length();string bigLetter[] = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};string unit[] = {"元", "拾", "佰", "仟", "万","拾", "佰", "仟","亿", "拾", "佰", "仟", "万"};string small[] = {"分", "角"};string newS = "";for(int i = 0; i < sLength; i ++) {if(flag == INT_ONLY) {newS = newS + bigLetter[s.at(i) - 48] + unit[sLength - i - 1];} else if(flag == SMALL_ONLY) {newS = newS + bigLetter[s.at(i) - 48] + small[sLength - i - 1];}}return newS;}string splitNum(string s) {if("" == s) {return "";}string intOnly = s.substr(0, s.size() - 2);string intPart = formatChinese(1, intOnly);string smallOnly = s.substr(s.size() - 2, s.size());string smallPart = formatChinese(2, smallOnly);string newS = intPart + smallPart;return newS;}string replaceAll(string src, string regex, string replacement) {int length = regex.length();while(src.find(regex) < src.length()) {src.replace(src.find(regex), length, replacement);}return src;}string cleanZero(string s) {if("" == s) {return "";}string regex1[] = {"零仟", "零佰", "零拾"};string regex2[] = {"零亿", "零万", "零元"};string regex3[] = {"亿", "万", "元"};string regex4[] = {"零角", "零分"};for(int i = 0; i < 3; i ++) {s = replaceAll(s, regex1[i], "零");}for(int q = 0; q< 3; q++) {s = replaceAll(s, "零零零", "零");s = replaceAll(s, "零零", "零");s = replaceAll(s, regex2[q], regex3[q]);}for(int z= 0; z< 2; z ++) {s = replaceAll(s, regex4[z], "");}s = replaceAll(s, "亿万", "亿");return s;}int main(){cout << "\n将数字转换成中文金额的大写形式:\n" << endl;string s = getNum();if(checkNum(s)) {s = roundString(s);s = splitNum(s);s = cleanZero(s);cout << "转换成中文为:" << s << endl;} else {cout << "错误!" << endl;}cout << "\n--------------------------------------------------------------" << endl;}



返回列表页>>> 数字货币