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

[µo°Ý] ½Ð±Ð·s¼Wªí³æ½s¸¹°ÝÃD

¦^´_ 10# GBKEE


    G¤j¯uªº¬O§Úªº°¸¹³,,·PÁ ¦³Ãö¤é´Á³]©w­pºâ¦~ÄÖ2.zip (17.26 KB)
¡@G¤j¡@¤p©fÁÙ¦³¤@­Ó¤p°ÝÃD,ªþ¥ó¥Î±zµ¹§Úªºfuntion¬°¦ó±a¤£¥X¥þ¼t¥­§¡¦~ÄÖ¡ã¡ã¡ã
yvonne

TOP

¦^´_ 11# afu9240
  1. '** Val(¤å¦r) >  Âà´«¼Æ¦r******************
  2.             AGE = Val(Round(Int(AGE / 12), 0) & "." & AGE - (Round(Int(AGE / 12), 0) * 12))  ' ³Ñ¾l¤ë¥÷ªº¤p¼ÆÂI
  3.             
  4.             '**10¶i¦ìªº¤p¼ÆÂI***¥­§¡¦~ÄÖ¸û¬°·Ç½T  *****************
  5.             AGE = Round((AGE / 12), 2)   '10¶i¦ìªº¤p¼ÆÂI
  6.             '*******************************************
½Æ»s¥N½X
  1. Sub ¥­§¡¦~ÄÖ()
  2.     Dim aa As Range
  3.     Cells(1, 8) = Now()
  4.     'Times = Cells(65536, x + 1).End(xlUp).Row
  5.     Set aa = Range("d2:d" & [d2].End(xlDown).Row) '©Ò¦³¥[Á`½d³ò
  6.    
  7.     Sheets("¤u§@ªí1").Cells(9, 9) = Application.WorksheetFunction.Sum(aa) / aa.Count
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

  1.     '** Val(¤å¦r) >  Âà´«¼Æ¦r******************
  2.                 AGE = Val(Round(Int(AGE / 12), 0) & "." & AGE - (Round(Int(AGE / 12), 0) * 12))  ' ³Ñ¾l¤ë¥÷ªº¤p¼ÆÂI
  3.                
  4.                 '**10¶i¦ìªº¤p¼ÆÂI***¥­§¡¦~ÄÖ¸û¬°·Ç½T  *****************
  5.                 AGE = Round((AGE / 12), 2)   '10¶i¦ìªº¤p¼ÆÂI
  6.                 '*******************************************
½Æ»s¥N½X
¦^´_ 12# GBKEE

½Ð±ÐG¤j ³o¬q ¦³Ãö¤é´Á³]©w­pºâ¦~ÄÖ2 (2).zip (17.83 KB) ©ñ¶i¥h«á,­ì¥»­pºâªº¦~ÄÖ·|Åܤ£¥¿½T,¬O­þ¤@­Ó¦a¤è¦³¥X²{°ÝÃD©O!!!¦A½ÐG¤j¨ó§U ÁÂÁÂ
yvonne

TOP

¦^´_ 13# afu9240
µ¹ªºµ{¦¡½X½Ð¦h¤F¸Ñ¤~·|¬°¤v¥Î
  1. '** Val(¤å¦r) >  Âà´«¼Æ¦r****¬O¦]¬°funtion¶Ç¦^¤å¦r ,SUM()µLªk¥[Á`,¦Ó­×§ïªº
  2.             AGE = Val(Round(Int(AGE / 12), 0) & "." & AGE - (Round(Int(AGE / 12), 0) * 12))  ' ³Ñ¾l¤ë¥÷ªº¤p¼ÆÂI

  3.             '**10¶i¦ìªº¤p¼ÆÂI***¥­§¡¦~ÄÖ¸û¬°·Ç½T  *****************
  4.             AGE = Round((AGE / 12), 2)   '10¶i¦ìªº¤p¼ÆÂI    'funtion¶Ç¦^¼Æ¦r ,SUM()¥i¥H¥[Á`¤£¥²­×§ï
  5.             '******************************************
½Æ»s¥N½X

£¿¦¹µ{¦¡½X¦³µù¸Ñ,½Ð¦A¤F¸Ñ¬Ý¬Ý ,¤G¿ï¤@¨Ï¥Î
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 14# GBKEE


    ·PÁÂG¤j¹ªÀy,§Ú·|§V¤O,>>>>>:'(
yvonne

TOP

¦^´_ 14# GBKEE


    G¤j ©êºp  ·Q¸ò±z½Ð±Ð
  
   ­n¦p¦ó¬d¸ß¨ì¸ê®Æ¨ì³¡ªù¤H­û¸ê®Æ«á,ª½±µ­pºâ¥X³¡ªù¥­§¡¦~ÄÖ©O???¨D¨ó§U ÁÂÁÂ

   ¯à¦b¤u§@ªí1¶À¦â¹ê½uÀx¦s®æÅã¥Ü¶Ü??? 20180105.zip (45.5 KB)
yvonne

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-1-6 08:02 ½s¿è

¦^´_ 16# afu9240
  1. Function AGE(D1 As Date)     'Module1(¤@¯ë¼Ò²Õ)
  2.         Application.Volatile (False)
  3.         If IsDate(D1) And D1 > 0 Then
  4.             AGE = DateDiff("m", D1, Date)
  5.             'AGE = Round(Int(AGE / 12), 0) & "." & AGE - (Round(Int(AGE / 12), 0) * 12)  ' ¤p¼ÆÂI¬°³Ñ¾l¤ë¥÷
  6.             '***¦¹AGEªºµ{¦¡½X¤¤**  & "." & ** ¶Ç¦^¤å¦r¤£¯à­pºâ,¥ÎVAL()¨ç¼Æ±N¤å¦rÂର¼Æ¦r,¥i­pºâ
  7.             AGE = Val(Round(Int(AGE / 12), 0) & "." & AGE - (Round(Int(AGE / 12), 0) * 12))  ' ¤p¼ÆÂI¬°³Ñ¾l¤ë¥÷
  8.             
  9.             'AGE = Round((AGE / 12), 2)   '¤p¼ÆÂI¬°10¶i¦ì  '***¦¹AGE¶Ç¦^¼Æ¦r,¥i­pºâ
  10.             
  11.        End If
  12. End Function
½Æ»s¥N½X
  1. Private Sub CommandButton1_Click()
  2.     With Worksheets("¤H­û¦~¸ê¤ÀªRªí")
  3.         If .AutoFilterMode Then .UsedRange.AutoFilter
  4.     End With
  5.     End
  6. End Sub
  7. 'Private Sub CommandButton4_Click() '*****
  8. Private Sub ComboBox4_Change()  '¥i§ï¥ÎChange¤£¶·¦A«ö¬d¸ß
  9.     Dim Rng As Range, AGE_Average As Double
  10.     'If ComboBox4.ListIndex = -1 Then MsgBox "½Ð¿é¤J¥¿½Tªº­È": Exit Sub
  11.     If ComboBox4.ListIndex = -1 Then Exit Sub        '.ListIndex = -1 ¤£¦b²M³æªº¤º®e
  12.     Set Rng = Worksheets("¤H­û¦~¸ê¤ÀªRªí").Range("A2")
  13.     If Rng.Parent.AutoFilterMode Then Rng.AutoFilter   '¨ú®ø¦Û°Ê¿z¿ï
  14.     Set Rng = Range(Rng, Rng.End(xlToRight).End(xlDown))
  15.     Rng.AutoFilter 1, ComboBox4.Value
  16.     Set Rng = Range(Rng.Cells(2, 1), Rng.End(xlToRight).End(xlDown)).SpecialCells(xlCellTypeVisible)
  17.     AGE_Average = Round(Application.WorksheetFunction.Average(Rng.Columns("G")), 2)
  18.     MsgBox ComboBox4 & " ³¡ªù" & vbLf & "¥­§¡¦~ÄÖ " & AGE_Average
  19.    
  20.     With Worksheets("¤u§@ªí1")
  21.         .Cells.Clear
  22.         Rng.Copy .[a1]
  23.         With .Range("g1", .Range("g1").End(xlDown).Address)
  24.             .Cells(.Count + 1) = "=Average(" & .Cells.Address & ")"
  25.            .Cells(.Count + 1).NumberFormatLocal = "0.00_)"
  26.         End With
  27.     End With
  28. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD