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

[µo°Ý] ¦p¦ó²¤Æ§PÂ_¦¡ if ... or ... then

[µo°Ý] ¦p¦ó²¤Æ§PÂ_¦¡ if ... or ... then

¤j®a¦­¦w¡A¦pªG§Úªº§PÂ_¦¡«Ü¦h ...
if A or B or C or D or E or F or G or .......... then
½Ð°Ý¦³¬Æ»ò¤èªk¥i¥H²¤Æ©O¡H
ÁÂÁ¦U¦ì¤j¤j ^^
Áú¼wº¸ÇU­ì¤ì
http://beau.tw

¦^´_ 1# beau1029
    §PÂ_¦¡«Ü¦h ...
if A or B or C or D or E or F or G or .......... then
½Ð°Ý¦³¬Æ»ò¤èªk¥i¥H²¤Æ©O¡H

VBA ªº ±ø¥ó§PÂ_ ¤]¦³«Ü¦h...
A or B or C or D or E§PÂ_¦¡(¤º®e)??? ½Ð»¡²M·¡,³Ì¦n¬OªþÀɤW¨Ó
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

¨ä¹ê¥u¬O²³æªº§PÂ_¥y

If car.text=01/02 or car.text=03/04 or car.text=05/06 or car.text=07/08 or car.text=¡K then
¡K¡K

¦]¬°§Úªº car ¦³ 170 ­Ó¡A©Ò¥H¬O§_¥i¥H²¤Æ¡H
Áú¼wº¸ÇU­ì¤ì
http://beau.tw

TOP

¦^´_ 3# beau1029
If car.text=01/02 or car.text=03/04 or car.text=05/06 or car.text=07/08 or car.text=¡K then
01/02,03/04 ..... ¦³170­n§PÂ_ªº³o¨Ç±ø¥ó¦bÀÉ®×­þ¸Ì...  §A¤£»¡¨S¤H....
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ª©¥D¡AÀ³¸Ó¬O§Úªí¹F¤£²M ^^||| §Ú«á¨Ó¥Î case ¸Ñ¨M¤F
Áú¼wº¸ÇU­ì¤ì
http://beau.tw

TOP

¦^´_ 5# beau1029

170­Ó±ø¥ó ¥ÎCase ·|®e©ö¥X¿ù(±ø¥ó­n¼g²M·¡)!!
  1. '170­Ó±ø¥ó ¥ÎCase ·|®e©ö¥X¿ù(±ø¥ó­n¼g²M·¡)!!
  2. Option Explicit
  3. Sub ExA()
  4.     Dim A As String, Msg As Boolean, E As Variant
  5.     A = "01/02"               '³o¬O¤é´Á??
  6.     For Each E In [A1:A170]   '¤é´Á¦s©ñ¦ì¸m ®æ¦¡ "mm/dd"
  7.         If E.Text = A Then
  8.             Msg = True
  9.             Exit For
  10.         End If
  11.     Next
  12.     If Msg Then
  13.         MsgBox E.Address & "  " & E
  14.         '***** µ{¦¡½X!!!*****
  15.     End If
  16. End Sub
  17. Sub ExB()
  18.     Dim AR, A As String, M As String, Msg As Boolean, E As Variant
  19.     AR = Array("01/02", "03/04", "05/06", "07/08")    '§PÂ_ªº±ø¥ó¦b³o¸Ì
  20.     A = "05/06"
  21.     'AR = Filter(AR, A, True)   '§ä¥X
  22.     AR = Filter(AR, A, False)   '§ä¥X¤£¦P
  23.     If UBound(AR) > -1 Then
  24.         MsgBox Join(AR, vbLf)
  25.         '***** µ{¦¡½X!!!*****
  26.     End If
  27. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# beau1029
°ÝÃD¸Ñ¨M¤F¡A§PÂ_ªºµ{¦¡¯à§_¤À¨É¦^õX¤@¤U¡C
³o¼Ë¤~ª¾¹D°ÝÃDªº°ÝÃD¦b­þ¸Ì

TOP

ª©¥D¡A§Ú¦^®a¹L¥À¿Ë¸`¡A¦^¨Ó«á¸Õ¸Õ¬Ý¡AÁÂÁ ^^
Áú¼wº¸ÇU­ì¤ì
http://beau.tw

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD