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

[µo°Ý] ¿ï¾Ü³æ¤¸®æ®ÉÄæ¦CÅܦâ

[µo°Ý] ¿ï¾Ü³æ¤¸®æ®ÉÄæ¦CÅܦâ



Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    On Error Resume Next
     If Target.Count > 1 Then Exit Sub
    Cells.FormatConditions.Delete
   
With Target.EntireColumn.FormatConditions  'ÄæÅܦâ
        .Delete
        .Add xlExpression, , "TRUE"
        .Item(1).Interior.ColorIndex = Int(28)
    End With
   
With Target.EntireRow.FormatConditions  '¦CÅܦâ
        .Delete
        .Add xlExpression, , "TRUE"
        .Item(1).Interior.ColorIndex = Int(35)
    End With
   
With Target.FormatConditions  '³æ¤¸®æÅܦâ
        .Delete
        .Add xlExpression, , "TRUE"
        .Item(1).Interior.ColorIndex = Int(4)
    End With
End Sub

¦U¦ì¤j¤j
¤p§Ì¬°¤F¤è«K¿ëÃѥثeªº¬Ý­þ­ÓÄæ¦C¡A¤Wºô¥h§ä¤F"¿ï¾Ü³æ¤¸®æ®ÉÄæ¦CÅܦâ"ªº»yªk
½T¹ê¬O¦³¹F¨ì§Ú­nªº®ÄªG
¦ý¬O
¿O¸¹¨º­ÓÄæ¦ì«o¤£¨£¤F



½Ð°Ý¤W­±¨º¬q»yªk­þ¸Ì¼g¿ù¡A·Ð½Ðª¾¹Dªº¤j¤j­ÌÀ°§U¤p§Ì¸Ñ´b

¦^´_ 20# cowww


    ÁÂÁ«e½ú¦^´_
Sorry
«á¾Ç¬ã¨s«Ü¤[,·d¤£À´¦p¦ó§ïÅܮ֨ú¤è¶ô¦rÅé¤j¤p.....
½Ð«e½ú¦Aª¦¤å¬ã¨s¬Ý¬Ý
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 19# Andy2483

«D±`·PÁ­㴣³¡ªL¤j¤jªº¸Ñ´b
«D±`·PÁÂAndy2483¤j¤jªº¸Ñ´b

¦³¨Ï¥Î¤F­ã´£³¡ªL¤j¤j´£¨Ñªº¼gªk¤Îª«¥ó
¯uªº«Ü¤è«K
¦ý¬O¬°¦ó¤Ä¿ïªºª«¥óµLªk§ïÅܤj¤p¤Î¤å¦r??

TOP

¦^´_ 18# cowww

¥Î ­ã´£³¡ªL«e½úªº½d¨Ò ¬õ®Ø½u§ï¦¨¶À³z©ú¶ñº¡
±ÀÂ˨ϥΦ¹¤èªk,¤£·|ÅܰʨìÀx¦s®æ®æ¦¡

±¡¹Ò1:


±¡¹Ò2:



TEST_¿ï¨úÄæ¦C_20230504_2.zip (16.67 KB)
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 17# cowww

§Ú§â»yªk§ï¦¨³o¼Ë
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With Target
   Dim xR As Range, xA As Range, xB As Range
   If .Columns.Count = Columns.CountLarge Then Exit Sub
   If .Count > 1 Or .Column = 1 Or .Row < 5 Then Exit Sub
   Set xR = .Cells: Set xA = Range([B1], Cells(1, Columns.Count)).EntireColumn
   Set xB = Range([A5], Cells(Rows.Count, 1)).EntireRow
   With Intersect(ActiveSheet.UsedRange, xA, xB)
      .Interior.ColorIndex = xlNone
      If Range("F2") = "N" Then
                Intersect(xR.EntireRow, .Cells).Interior.ColorIndex = 0
                Intersect(xR.EntireColumn, .Cells).Interior.ColorIndex = 0
                .Interior.ColorIndex = 0
            Else
                Intersect(xR.EntireRow, .Cells).Interior.ColorIndex = 6
                Intersect(xR.EntireColumn, .Cells).Interior.ColorIndex = 6
                  End If
        End With
            .Interior.ColorIndex = 4
    End With
End Sub

Åܦâ¿ï¾Ü"YES"


Åܦâ¿ï¾Ü"NO"


¦³¿ìªk§â"NO"ªº³æ¤¸­Ó©³¦âÅܦ¨ µL¦â ¶Ü?

TOP

¥»©«³Ì«á¥Ñ cowww ©ó 2023-5-4 14:23 ½s¿è

¦^´_ 13# Andy2483

«D±`·PÁ­㴣³¡ªL¤j¤j´£¨Ñªº·s¼gªk
§Ú¥i¯à­n¬ã¨s¤@¬q®É¶¡¤~¯à¬Ý±oÀ´

«D±`·PÁÂAndy2483¤j¤jªº¸Ñ´b
§Ú²{¦b¦³¤@­Ó°ÝÃD
±NÅܦâÃö±¼ªº®É­Ô¡A¤wÅܦ⪺³æ¤¸®æ+Äæ¦ì+¦C¦ì¤£·|®ø¥¢
´NºâÃö±¼Åܦâ¥hÂI¿ï¨ä¥L³æ¤¸®æ¤]¤£·|®ø¥¢
½Ð°Ý³o­Ó°ÝÃD¦³¿ìªk¸Ñ¨M¶Ü??

TOP

¦^´_ 14# ­ã´£³¡ªL
­ã¤j³o¤è¦¡§¹¥þ¸Ñ¨MÅܦâ«áªº°ÝÃD¡Aª½±µ¥Î®Ø½u¨Ó¼Ð°O¯uªº¼F®`¤F...!

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-5-4 14:08 ½s¿è

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


    ÁÂÁ«e½ú«ü¾É¤£Åܧó®æ¦¡¥YÅãµJÂIÀx¦s®æªº¤è¦¡


Option Explicit
Sub ©R¦W¿ï¨úªº¹Ï¤ù_¦WºÙ()
Selection.ShapeRange.Name = "¯x§Î_¾î"
End Sub
Sub ¿ï¨úªº¹Ï¤ù_¦WºÙ()
MsgBox Selection.ShapeRange.Name
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2023-5-4 13:41 ½s¿è

²³æ½d¨Ò//
¥Î¤F¤@­Ó¿ï¨úª«¥ó//
¨â­Ó¯x§Î(¥i©ñ¦b¸ê®Æ°Ï¥k¤è, ¥H¤£¼vÅT¸ê®Æ¬°¥D)...Range("M1")..¥i¦Û¦æ§ó§ï
­Y¨ä¥¦¤u§@ªí¤]­n¦P¼Ë¥\¯à, ±NSelection_Changeµ{¦¡¤Î¨º¤T­Óª«¥ó½Æ»s§Y¥i(ª`·N:ª«¥ó¦WºÙ)

TEST_¿ï¨úÄæ¦C.rar (9.31 KB)


¸É¥R//¬°¤F¨¾¤î¿ï¨ú°Ï¤£¦b¨Ï¥Î½d³ò¤ºªº¿ù»~, ­×§ï¦p¤U
Set X = Intersect(Selection.EntireRow, ActiveSheet.UsedRange)
If X Is Nothing Then Exit Sub
Set Y = Intersect(Selection.EntireColumn, ActiveSheet.UsedRange)
If Y Is Nothing Then Exit Sub

TOP

¦^´_ 11# cowww


    If [B4] <> "¿O¸¹" Then Exit Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : µêªÅ¦³ºÉ¡D§ÚÄ@µL½a¡AµoÄ@®e©ö¦æÄ@Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD