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

[µo°Ý] VBAÂI¿ïÀx¦s®æ«ü©w½d³ò¦Û°Ê¤Ï¦â

[µo°Ý] VBAÂI¿ïÀx¦s®æ«ü©w½d³ò¦Û°Ê¤Ï¦â


¥H¤Uµ{¦¡½X¬O¦bºô¸ô¤W§ä¨ìªº¡A¦ý·Q½Ð±Ð¸Ó¦p¦ó­×§ï¦¨¥H¤U·Q­nªº±ø¥ó©O¡H
1. §Æ±æ¤Ï¦â±ø¥ó¥u¦bI7:O18¦³§@¥Î¡A¥B§ï¥H¾ã¦C¤Ï¦â§e²{¡C¨Ò¦p¡GÂI¿ïK9®É¡AI9:O9·|¾ã¦C¤Ï¦â¡BÂI¿ïN15®É¡AI15:O15¾ã¦C¤Ï¦â
2. µo²{¨Ï¥Î¦¹VBA¤§«áµLªk½Æ»s¶K¤W©Î°Å¤U¶K¤W¡A¨Ò¦p·í§Ú½Æ»sB7«á¡A¥u­n·Æ¹«ÂI¿ï¥ô¦óÀx¦s®æ±ý¶K¤W®É¡A½Æ»sªº¿ï¶µ´N·|®ø¥¢¡C°Å¤U±ý¶K¤Wªº¥\¯à¥ç¬Û¦P
¥H¤W¨D¸Ñ~~~~~~~

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
   If Application.CutCopyMode = xlCopy Then Me.Paste
   On Error Resume Next
   [colorCell].FormatConditions.Delete
   Target.Name = "colorCell"
   With [colorCell].FormatConditions      ' ³]©w®æ¦¡¤Æ±ø¥ó
       .Delete
       .Add xlExpression, , "TRUE"        ' ±ø¥ó(¤@)¤º¤½¦¡¬°
       .Item(1).Interior.ColorIndex = 36  ' .Item(1)µ¥©óFormatConditions(1)
       .Item(1).Font.Bold = True
   End With
End Sub



´ú¸ÕÀÉ.rar (15.08 KB)
*¦v¤k¤@ªTµL»~*

¦^´_ 1# msmplay


   ¬Ý°_¨Ó¦n¹³½ÆÂø¤Æ¤F¡A­Y¥u¦³ÂI¿ï¤Ï¥Õ¥u­n¦p¤U¥N½X§Y¥i
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  2. If Target.Column <= 15 And Target.Column >= 9 And Target.Row >= 7 And Target.Row <= 18 Then '¿ï¾ÜI7:O18¤~°õ¦æ
  3.     Range(Cells(Target.Row, "i"), Cells(Target.Row, "o")).Select'§â¿ï¾Üªº½d³òRow¦AÂX¤j¬° I ¨ì O ¿ï¾Ü
  4. End If
  5. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# lpk187


   l¤j~«D±`·PÁ±zªº¼ö¤ßÀ°¦£~~¤£¹LÂæ¦n¹³¤Ï¦ÓÅܱo§ó¦h°ÝÃD¤F­C!!¼P~~~~
1. ÁöµM¦Û°Ê¤Ï¦â®ÄªG¬O­n¦bI7:O18¦¨¥ß¡A¦ý¨Ã¤£¬O­n§â¾ã¦C¿ï°_¨Ó¡A¦]¬°Âæ·|Åܦ¨¦pªG§Ú»Ý­n¦bI7:O18¸Ì¨ä¤¤¤@®æ½Æ»s©Î¶K¤Wªº¸Ü¡A´N·|Åܦ¨¤@¾ã¦C½Æ»s¡B¤@¾ã¦C¶K¤W¡A¦Ó¤£¯à¥u³æ¿ï¤@­ÓÀx¦s®æ¤F¡C
2. I7:O18µL½×ÂI¿ï¥ô¤@Àx¦s®æ³£·|Åܦ¨¿ï¨ú¾ã¦C¡AÂæ·|³y¦¨§ÚµLªkÅã¥Ü¥Ø«e¿ï¨úªºÀx¦s®æ¬O°±¯d¦b­þ¤@®æ¤W­±¡A¦]¬°¾ã¦C¤Ï¦â¬O¬°¤F¬ðÅã¸Ó¦C¡A¦ý¤´»Ý­n¥¿±`Åã¥ÜÂI¿ïÀx¦s®æ®Éªº¶ÂÃä®Ø³á¡C


©Ò¥H¦pªG¥i¥H¡AÁÙ¬O§Æ±æ¯à¥H­ì¦³®ÄªG§e²{¡A¥u¬O¦A­×§ï¤@¤U±ø¥ó¡AÂ榳¿ìªk¹F¨ì¶Ü¡H
*¦v¤k¤@ªTµL»~*

TOP

¦^´_ 3# msmplay


    ¶â¡I¥i¯à¬O§Ú²z¸Ñ¯à¤O¤Ó®t¡I§A2¦¸ªº»¡©ú§Ú³£¬Ý¤£À´¡I»F¦¨§Aªº¦]ÂZ¡A¹ê·P©êºp ¡I

TOP

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim SelArea As Range
With Target
¡@¡@¡@Set SelArea = Intersect([I7:O18], .Cells)
¡@¡@¡@If SelArea Is Nothing Then Exit Sub
¡@¡@¡@If .Address <> SelArea.Address Then Exit Sub
¡@¡@¡@.Name = "colorcell"
End With
End Sub

®æ¦¡¤Æ±ø¥ó¤½¦¡¡G=MODE(ROW(),ROW(colorcell))¡@
¡@
Xl0000045.rar (10.37 KB)
¡@
¡@

TOP

¦^´_ 5# ­ã´£³¡ªL


   ­ã¤j~~«D±`·PÁÂÀ°¦£³á!!
*¦v¤k¤@ªTµL»~*

TOP

½Ð°Ý
¥i¦P®É¿ï¨ú¢±¦C¥H¤Wªº±ø¥ó¡A¥i¥HÅܦ¨¥Î  ctrl ÂI¿ï ¦h¦C¥H¤W¶Ü?

TOP

¦^´_ 7# momo020608

¦P®É¿ï¨ú¢±¦C¥H¤W¡A¥i¥HÅܦ¨¥Î  ctrl ÂI¿ï ¦h¦C¥H¤W¶Ü?

TT20170225-02(¿ï¨úÀx¦s®æ,¦CÅܦâ).rar (11.09 KB)

­Y¦C¼Æ¤Ó¦h, ¤£«OÃÒ¦³®Ä(¤å¦r¦ê¦r¼Æ¥i¯à¶W­­)

TOP

¦^´_ 8# ­ã´£³¡ªL

ÁÂÁ¤j®v~

TOP

¦^´_  momo020608

¦P®É¿ï¨ú¢±¦C¥H¤W¡A¥i¥HÅܦ¨¥Î  ctrl ÂI¿ï ¦h¦C¥H¤W¶Ü?



­Y¦C¼Æ¤Ó¦h, ¤£«OÃÒ¦³ ...
­ã´£³¡ªL µoªí©ó 2017-2-26 22:33

·Q¤Þ¥Î³o­Ó¥DÃD½Ð±Ð­ã¤j:
ÂI¿ïÀx¦s®æªº¦æ¤]¶·¤Ï¦â(¥Ø«e¥u¦³¦C¦³¤Ï¦â)¡A¤Î¦C»P¦æ¥æ¶°³B(§YÂI¿ïªºÀx¦s®æ)¥Î§OªºÃC¦â¤Ï¦â(¨Ò¦p¥Î¬õ¦â)¡A­n¦p¦ó°µ¨ì???

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD