VBA 操作 Excel 数据筛查
2016-09-22 11:06
423 查看
今天要统计程序中用到了哪些表, 统计出来, 发现有很多重复的
就想到用Excel筛一下
自定义了一个宏, 处理这个问题
就想到用Excel筛一下
Sub cal() ' ' cal 宏 ' Dim num As Integer Dim dataCol As Integer Dim maxRow As Integer Dim resultCol As Integer num = 1 dataCol = 4 maxRow = 2728 resultCol = 6 For i = 1 To maxRow For j = i + 1 To maxRow If Cells(i, dataCol) = Cells(j, dataCol) And Not Cells(j, dataCol).Interior.Color = 65535 Then Cells(j, dataCol).Interior.Color = 65535 End If Next Next For i = 1 To maxRow If Not Cells(i, dataCol).Interior.Color = 65535 Then Cells(num, resultCol) = Cells(i, dataCol) num = num + 1 End If Next End Sub
自定义了一个宏, 处理这个问题
相关文章推荐
- [VBA]Excel操作IE(打开网页、等待网页加载、填写网页控件数据、点击网页按钮、抓取网页数据)
- 使用VBA尝试操作Excel数据
- Excel中VBA操作数据表
- ★Excel-VBA操作文件四大方法之一 by excelhome
- ★★Excel-VBA操作文件四大方法之二 by excelhome
- C#中对Excel的数据操作.
- 用Java POI操作Excel,读取数据导入DB2数据库
- 三、 ASP操作Excel生成数据表
- EXCEL中操作数据
- 利用SQL Server的DTS操作EXCEL、Access等数据表的导入导出
- 使用VSIUAL C#.NET操作Excel -把DataTable中的数据写入Excel
- ★★Excel-VBA操作文件四大方法之二
- lotus中操作excel--引入excel数据至notes中
- 【EXCEL】VBA操作相关资料
- C#操作EXCEL之用OleDb快速读取数据到DataTable
- ★★★Excel-VBA操作文件四大方法之三 by excelhome
- C#操作Excel,套用模板并对数据进行分页
- 在Excel中使用VBA来筛选数据
- 使用VSIUAL C#.NET操作Excel -把DataTable中的数据写入Excel
- 直接将数据导出到Excel文件,直接操作文件没有使用Variant