ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Ãö©ó¡GFind & IsError ¨Ï¥Î¤Wªº°ÝÃD

[µo°Ý] Ãö©ó¡GFind & IsError ¨Ï¥Î¤Wªº°ÝÃD

¥»©«³Ì«á¥Ñ play9091 ©ó 2012-4-8 22:06 ½s¿è

°²³]¡G¦b "sheets" ¤¤¨Ã¨S¦³¡A11152D¡A³o­Ó¼Æ­È¡C¨º»ò

range("A:A").find(what:=11152D)

´N·|¥X²{¿ù»~¡C

¨º§Ú­n¨Ï¥Î³o¼Ë¤lªº¿ù»~¨Ó·f°t "IsError" ¨Ó§Î¦¨§PÂ_»y¥y

If IsError(range("A:A").find(what:=11152D))=true then

³o­Ó®É­Ô«o¸õ¥X¡u°õ¦æ¶¥¬q¿ù»~ '91' :¡v¡C

½Ð±Ð¦U¦ì¥ý¶i¡C³o¬O¤°»ò°ÝÃD¤Þ°_ªº©O¡H¦³¨S¦³¤°»ò¸Ñ¨Mªº¤èªk¡H¡H
ªì¾ÇVBA¥E¨ìtwbts

¦^´_ 1# play9091


If Range("A:A").Find("11152D") Is Nothing Then

TOP

¦^´_ 2# register313


¦n¹³¤£¦æ¤]¡A¦]¬°¥¦¥»¨­¦b Range("A:A").Find("11152D") ´N·|¸õ¿ù»~¤F¡K¡K¨S¦³¿ìªk¹ï¥¦°µ Is Nothing ªº§PÂ_¡I
ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 3# play9091

½Ðªþ¤WexcelÀ£ÁYÀÉ(¤º¦³§¹¾ãµ{¦¡½X)
¨Ñ§@ÀË´ú

TOP

¦^´_ 3# play9091


   Set Rng= Range("A:A").Find("11152D")
If Rng Is Nothing Then  '§ä¤£¨ì´N°õ¦æ
If Not Rng Is Nothing Then  '§ä¨ì´N°õ¦æ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# register313


    ªþÀÉ¡K¡K

¦^´_ 5# Hsieh


    Hsieh¶Wª©ªº¤èªk¤]¤£¦æ¤]¡K¡K

test.rar (432 KB)

ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 6# play9091


If Sheets("Swap Cell DB").Range("B:B").Find(what:=TF2) Is Nothing Then
    RowX = Sheets("Swap Cell DB").Range("B:B").Find(what:=TF2).Row   

1.¬JµM¬OIs Nothing(§ä¤£¨ì¸Ó­È¤§Àx¦s®æ),¤S¦p¦ó¶Ç¦^¸ÓÀx¦s®æ¤§¦C¸¹
2.ÅܼƤ£¯à¥ÎRow

TOP

¦^´_ 7# register313


    ¬Q¤Ñ±ß¤W¯uªº¬O¼g¨ì©ü±¼¤F¡A¨S¦³¬Ý²M·¡¬O¥Î "¡K¡KIs Nothing" ÁÙ¬O "Not¡K¡KIs Nothing" ¡A·PÁ¤G¦ìªºÀ°¦£¡I
ªì¾ÇVBA¥E¨ìtwbts

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD