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

µ{¦¡¦p¦ó¼g¤ñ¸û¶¶ºZ§Ö³t

¦^´_ 1# myleoyes
¸Õ¸Õ¬Ý
  1. Sub ½m²ß()
  2.     Dim Rng As Range
  3.     With Sheets("½m²ß")
  4.         .[AG3] = "=AB2-SUM(AD2/2,AE2,AA3,AC3/2)": .[AI3] = "=AG3/(AA3+AC3/2)"
  5.         Set Rng = Sheets("½m²ß").Range("V" & Rows.Count).End(xlUp)(2, 1)
  6.         Rng = Date
  7.         ZZ = Application.InputBox("½Ð¿é¤J¼Æ¦r", "½m²ß¸ê®Æ", Type:=1)
  8.         If ZZ <= 0 Then Rng = "": .[AG3,AI3] = "": End
  9.         With Rng.Cells(1, 2)    '¥ÑRngªºÄæ¦ìºâ°_²Ä2Äæ¦P¤@¦CªºÀx¦s®æ = WÄæ
  10.             .Value = ZZ
  11.             .Font.ColorIndex = 7
  12.         End With
  13. ag:
  14.         ZZ = Application.InputBox("½Ð¿é¤J¼Æ¦r", "¼Æ¾Ú¸ê®Æ", Type:=1)
  15.         If ZZ <= 0 Then GoTo ag
  16.         With Rng.Cells(1, 3)   '¥ÑRngªºÄæ¦ìºâ°_²Ä3Äæ¦P¤@¦CªºÀx¦s®æ=XÄæ
  17.             .Value = ZZ
  18.             .Font.ColorIndex = 7
  19.         End With
  20.         With Rng.Cells(1, 5)    '¥ÑRngªºÄæ¦ìºâ°_²Ä4Äæ¦P¤@¦CªºÀx¦s®æ=ZÄæ
  21.             For Each e In Array(1, 2, 4, 8, 10) '°}¦C: ¥ÑZÄæºâ°_ªºÄæ
  22.                 With .Cells(1, e)               '¥ÑZÄæºâ°_ªºÄæ¦P¤@¦CªºÀx¦s®æ
  23.                     .FormulaR1C1 = Cells(3, .Column).FormulaR1C1
  24.                     If e = 4 And .Value <= 150 Then
  25.                         .Value = 200
  26.                         .Font.ColorIndex = 7
  27.                     ElseIf e = 8 Then
  28.                         .Font.ColorIndex = 10
  29.                     ElseIf e = 10 And .Value < 0 Then
  30.                         .Font.ColorIndex = 3
  31.                     End If
  32.                 End With
  33.             Next
  34.         End With
  35.         .Columns("V:AI").EntireColumn.AutoFit
  36.         '¦p¬¡­¶Ã¯³]©w­pºâ :¤è¦¡¬°¤â°Ê,¨º¤~¶·­«ºâ¦¹¤u§@ªí.
  37.        .Calculate  '­«ºâ¦¹¤u§@ªí.
  38.        '¦¹­«ºâ ¤]³\¬O§A»{¬°°õ¦æ°_¨Óı±o«ÜºC ªº¥D¦]
  39.      End With
  40.      ActiveWorkbook.Save
  41. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# myleoyes
  1. If ActiveCell.Comment.Text Like "*°tªÑ*" Then ActiveCell.Font.ColorIndex = 5
½Æ»s¥N½X

TOP

¦^´_ 5# myleoyes
¥ÎR1C1 ªí¥Üªk
"=IF(ISNUMBER(MATCH(A1,EDATE(RC[-1],{0,6,12})-....,-"

TOP

¦^´_ 7# myleoyes
¥ÎR1C1 ªí¥Üªk"=IF(ISNUMBER(MATCH(A1,EDATE(RC[-1],{0,6,12})-....,-"

A1 ¨S§ï¨ì
"=IF(ISNUMBER(MATCH(R1C1,EDATE(RC[-1],{0,6,12})-....,-"[/quote]

TOP

¦^´_ 10# c_c_lai
¬Ý¬Ý¤u§@ªí¥¦ªº¤½¦¡
  1. Sub Ex()
  2.     [B5] = "=R[1]C[1]"
  3.     [B6] = "=C6"
  4.     [B7] = "=R[-1]C[1]"
  5.     [B8] = "=R6C3"
  6.     [B9] = "=$C$6"
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 13# myleoyes
¸Õ¸Õ¬Ý
  1. Sub µn¤J()
  2.     Dim ZZ As Range
  3.     On Error GoTo er:
  4.     With Sheets("¾Ç²ß")
  5.         Do
  6.             Set ZZ = Application.InputBox("½Ð¦bBÄ椤¿ï¨ú¸ê®Æ", "¸ê®Æµn¤J", Type:=8)
  7.             'InputBox ³]¬°Range ->    «ö ¨ú®ø ·|¦³¿ù»~
  8.             If ZZ(1).Column <> 2 Then xMsg = "¿ï¾Ü¥²»Ý¬O ""B"" Äæ"
  9.         Loop Until ZZ(1).Column = 2               'BÄæ
  10.         With .Range("N" & Rows.Count).End(xlUp)
  11.             .Cells(2, 1) = ZZ(1)                 '¹w¨¾ZZ¿ï¦h¦C,«ü©w¬°ZZªºCELLS(1)
  12.             .Cells(2, 2) = ZZ.Cells(1, 2)
  13.         End With
  14.     End With
  15. er:
  16.     Err.Clear
  17.     On Error GoTo 0
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 15# myleoyes
µ{¦¡¥i¥Hµn¤J¦ýµLªk¼g¤J(¤]´N¬O»¡¨S¦³¦Û°Ê)
   ¤p§Ì­×§ï¦p¤U¥u¬Oı±o´£¥Ü¹ï¸Ü®Ø¬O¥i¥H¬Ù²¤

­n¼g¤J¤°»ò,³o·§©À§Ú¤@ÂI³£¤£¤F¸Ñ,­n¦p¦ó¬Ù²¤¹ï¸Ü®Ø?

TOP

¦^´_ 17# myleoyes
§Aªº·Qªk¬O :
µn¤J¥i¥H«ü©w¦h­ÓBÄ檺¼Æ­È,«á°õ¦æ¼g¤Jµ{¦¡
  1. Sub Ex()
  2.     Dim Rng As Range, ZZ As Range, A As String, Msg As Boolean
  3.     With Sheets("¾Ç²ß")
  4.         Set Rng = .Range("b3", .[b3].End(xlDown))                  'BÄ檺½d³ò
  5.         For Each ZZ In Selection                                   '¤u§@ªí:©Ò¿ï¨úÀx¦s®æªº½d³ò
  6.             If Not Application.Intersect(Rng, ZZ) Is Nothing Then  '§PÂ_¦¹ª«¥ó¥Nªí¨â­Ó©Î¦h­Ó½d³ò­«Å|ªº¯x§Î½d³ò
  7.                 Msg = True
  8.                 A = IIf(A = "", ZZ.Address(0, 0), A & "," & ZZ.Address(0, 0))
  9.             End If
  10.         Next
  11.         If Msg = False Then
  12.             MsgBox "¨S¦³¿ï¾Ü¨ìBÄ檺¼Æ­È...": Exit Sub
  13.         Else
  14.             If MsgBox("©Ò¿ï¨ú¸ê®Æ " & A & Chr(10) & "½T©w ¼g¤J ...", vbYesNo) = vbNo Then Exit Sub
  15.         End If
  16.         For Each ZZ In Selection
  17.             If Not Application.Intersect(Rng, ZZ) Is Nothing Then
  18.                 With .Range("N" & Rows.Count).End(xlUp)
  19.                     .Cells(2, 1) = ZZ
  20.                     .Cells(2, 2) = ZZ.Cells(1, 2)
  21.                 End With
  22.             End If
  23.         Next
  24.     End With
  25.     ¼g¤J
  26. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD