Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 1105|回复: 1

求助:查找

[复制链接]
发表于 2012-5-24 11:29 | 显示全部楼层 |阅读模式
想在A列中查找"2012/01/04"

  1. Sheets("原始数据1").Range ("A1:A" & Sheets("原始数据1").Cells(Rows.Count, 1).End(xlUp).Row).find("2012/1/4", lookin:= xlvalues)
复制代码



这个报错,说缺少 :=

请问正确的写法是什么?
谢谢!
发表于 2012-5-24 13:16 | 显示全部楼层
Sub 按钮1_Click()
    Dim rng As Range
    With Sheets("原始数据1")
        Set rng = .Range("A1:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
        Set rng = rng.Find("2012/1/4", LookIn:=xlValues)
    End With
    If Not rng Is Nothing Then
        '自行修改
    End If
End Sub
回复

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-9-21 04:05 , Processed in 0.217814 second(s), 5 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表