本文介绍了如何使用excel vba根据货币标准格式化列中的数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想格式化一列的所有单元格.数据是一个数字,我想从左边添加一个小数,之后只保留两位数.然后按照货币标准对其进行格式化.例如:
I want to format all cells of a column. The data is a number and I want to add a decimal from left keeping only two digits after that. Then format it as per currency standards. For eg:
Data: Output:
10000 100.00
112233 1,122.33
123456789 1,234,567.89
要求正常,输出为斜体.
The requirement is normal and output is in italics.
推荐答案
以下内容会将给定的列格式化为货币:
The following will format a given column as Currency:
Sheets("Sheet1").Columns("A").NumberFormat = "£#,##0.00"
这篇关于如何使用excel vba根据货币标准格式化列中的数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!