EXCEL VBA 数据对比错误: Range(Cells(f, 1) & Cells(f, 6)).Select

[复制链接]
查看11 | 回复3 | 2011-10-22 14:12:56 | 显示全部楼层 |阅读模式
程序这么写慢死了,要循环多少次啊,你的意思是在两张表里找相同的部分,复制到一个表的空白处吧,这么写:Sub 找相同() Dim arr, x As Long, y As Long, d As Object, crr(), o As Long Dim brr o = 1 Set d = CreateObject("scripting.dictionary") x = Sheets("公司现行基药").Cells(6500, 1).End(xlUp).Row Sheets("公司现行基药").Cells(1, 22) = "共有" & x & "条数据"y = Sheets("平台基药库存").Cells(6500, 1...
回复

使用道具 举报

千问 | 2011-10-22 14:12:56 | 显示全部楼层
Range(Cells(f, 1) & Cells(f, 6)).Select改成:Range(Cells(f, 1) , Cells(f, 6)).Select...
回复

使用道具 举报

千问 | 2011-10-22 14:12:56 | 显示全部楼层
Range 和 Cells可用 Range(cell1, cell2) 返回一个 Range 对象,其中 cell1 和 cell2 为指定起始和终止位置的 Range 对象.不能用连接符“&”,必须“,”分开。Range(Cells(f, 1) & Cells(f, 6)).Select改为Range(Cells(f, 1) . Cells(f, ...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行