![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
excel
excel函数,VBA程序
又小雪666
本博客用于记录编程学习中遇到的问题及解决方法,方便查找。还有一些生活中的问题及感悟。
展开
-
VLOOKUP函数的使用
http://www.360doc.com/content/13/1119/20/9842991_330586745.shtml转载 2020-07-25 09:16:07 · 217 阅读 · 0 评论 -
第二个正式的VBA程序,好有成就感,帮助同事免去了每月600次的公式粘贴修改!
Private Sub Worksheet_Change(ByVal Target As Range)Application.EnableEvents = TrueDim col As Integer, sheetname As String, dateDay As Stringsheetname = "工商"For col = 8 To 38dateDay = ThisWorkbook.Worksheets("Sheet1").Cells(4, col).TextThisWorkbo...原创 2020-06-04 10:00:02 · 278 阅读 · 0 评论 -
【VBA】判断是否相等
Public Sub test2()Dim i As IntegerDim one As String, two As String, sub_two As StringFor i = 3 To 25461one = Cells(i, "A").Texttwo = Cells(i, "B").TextIf one <> two Thensub_two = ...原创 2020-04-27 16:13:15 · 4978 阅读 · 0 评论 -
【VBA】给单元格设置背景色
Cells(1, 1).Font.ColorIndex = 3 ' 字的色号为3 红色Cells(1, 1).Interior.ColorIndex = 3 ' 背景的色号为3 红色Cells(2, 1).Font.Color =RGB(0, 255, 0) '字的颜色- 绿色Cells(2, 1).Interior.Color =RGB(0, 0, 255) '背景的颜色- 蓝...原创 2020-04-27 11:39:38 · 7176 阅读 · 0 评论 -
我的第一个VBA程序 -基础知识
第一个VBA程序 刚开始读取的单元格内容总是空的,加上了ThisWorkbook.Worksheets("Sheet2")才可以的,这个没搞明白,需要查查 不等于怎么表示 <> if 最后要有end if Len()取长度 ...原创 2020-04-27 10:07:42 · 219 阅读 · 0 评论