BBS

  • 注册
  • 登录
  • 搜索
  • 标签
  • 帮助
BBS » 电脑、手机、平板知识专栏 » 求 VBA 里面NumberFormat 后面的参数 » 发表回复

预览帖子

游客


发表回复

用户名 游客 [会员登录]
  (可选)
  • Html 代码 可用
  • 表情 可用
  • Discuz!代码 可用
  • [img] 代码 可用
B I U | 字体 大小
| Align Left Align Center Align Right | Url Email Image | Quote Code
Rremove Format Unlink Undo Redo | Ordered List Unordered List Outdent Indent Float Left Float Right | Table Free Hide | flyflashmp3mtvmusicmusic2
flvmtv2music3
简单功能
  • 仿宋_GB2312
  • 黑体
  • 楷体_GB2312
  • 宋体
  • 新宋体
  • 微软雅黑
  • Trebuchet MS
  • Tahoma
  • Arial
  • Impact
  • Verdana
  • Times New Roman
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
收缩编辑框扩展编辑框
上传附件 描述
文件尺寸: 小于 25000 kb
  [完成后可按 Ctrl+Enter 发布]    恢复数据

主题回顾

肥仔恩 发表于 2016-2-19 11:48

大概懂了  在深入学习下  谢谢哇

zhendeaini 发表于 2015-12-17 11:49

参考微软官方解释:
NumberFormat 属性
参阅应用于示例特性应用于 DataLabel、DataLabels、PivotField、Style 和 TickLabels 对象的 NumberFormat 属性。

返回或设置对象的格式代码。String 类型,可读写。

expression.NumberFormat
expression      必需。该表达式返回上述对象之一。

应用于 CellFormat 和 Range 对象的 NumberFormat 属性。

返回或设置对象的格式代码。如果指定区域中的所有单元格包含不同的数字格式,则该值为 Null。Variant 类型,可读写。

expression.NumberFormat
expression      必需。该表达式返回上述对象之一。

说明
对于 PivotField 对象,可以只对其中一个数据字段设置 NumberFormat 属性。

格式化代码与“单元格格式”对话框中“格式化代码”选项相同的字符串。Format 函数使用与 NumberFormat 和 NumberFormatLocal 属性不同的格式化代码。

示例
以下这些示例分别对 Sheet1 中的 A17 单元格、第一行和 C 列的数字格式进行设置。

Worksheets("Sheet1").Range("A17").NumberFormat = "General"
Worksheets("Sheet1").Rows(1).NumberFormat = "hh:mm:ss"
Worksheets("Sheet1").Columns("C"). _
    NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"

肥仔恩 发表于 2015-12-15 11:10

@貌似是通用 然后 别的呢````

当前时区 GMT+8, 现在时间是 2026-4-3 16:50

清除 Cookies - 联系我们 - BBS - WAP - TOP - 界面风格

  • 默认风格
  • 喝彩奥运
  • 深邃永恒
  • 粉妆精灵
  • 诗意田园
  • 春意盎然
  • 黑色

Discuz!

Powered by Discuz! 6.0.0 © 2001-2007 Comsenz Inc.

Processed in 0.041081 second(s), 5 queries, Gzip enabled.