excel - Remove decimal by VBA from a cell in Excel 2010
问题描述
I wrote a code by VBA for removing decimal from a cell (A22) But it doesn't work.
Range("A22").Text = Format(Range("A22").Text, "#,###,###,##0")
may something is wrong. Any idea is welcome.
解决方案
尝试这个
Range("A1").Value = Format(Range("A1").Text, "#,###,###,##0")
推荐阅读
- macos - 修复 Mac 上的文件权限
- r - 为什么将日期时间放入R中的向量时会转换时区?
- swift - 如何暂停 touchesBegan 并且只使用 touchesMoved 反之亦然?
- javascript - 当我点击视频时,它不会弹出 [Jquery]
- python - Matplotlib饼图楔形透明度?
- javascript - vue.js 引用数据中的常量?
- javascript - 为什么div文本通过innerHTML用JavaScript调整后会自动恢复原状?
- mysql - MySQL 触发器不起作用
- ruby-on-rails - 工作时无法获得 Ruby
- python - 复杂的 django 查询,包括一对一模型