VBA 学习
2015-10-06 09:31
363 查看
Sub abc() Dim i Dim coloumn coloumn = 2 For i = 1 To 8 Dim currentValue currentValue = Val(ReplaceChar(Sheet2.Cells(i, coloumn))) If Application.WorksheetFunction.IsNumber(currentValue) Then If Abs(currentValue) < 0.05 Then Sheet2.Cells(i, coloumn).Interior.ColorIndex = 6 End If End If Next i End Sub Private Function ReplaceChar(c As String) As String Dim a a = Replace(c, "*", "") 'If InStr(a, "-") = 1 Then ' a = Replace(a, "-", "-0") 'End If ReplaceChar = a End Function
相关文章推荐
- Virtualbox 的 Kern Service 出问题了,怎么办?
- VBA 第13课 字典dictionary
- VBA 第12课 插入排序
- VBA 第11课 数组,取特定行数据
- 名字与地址转换getservbyname 与 getservbyport函数
- VBA 第10课 禁止关闭工作薄
- VBA 第9课 合并单元格
- VBA 第8课 Excel单元格的颜色,格式的设置
- Vagrant 启动报错:the "vboxsf" file system is not available
- VB.net视频打开方法
- VBA第7课 编写自定义函数
- Ubuntu vbox xp虚拟机共享文件夹
- VB2005 Project中Namespace的一个问题
- 【VBS教程】:VBS简介及如何编译VBS程序等
- 【VBS教程】:作业1
- 【VBS教程1】:基本输入输出
- 历年至今TVB剧集目录(持续更新...我已看过的推荐)
- 【来日复制粘贴】输出匹配到的字符串
- vs开发调用窗体的方法
- 张亦Excel VBA——基础篇