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

[µo°Ý] ½Ð«ü¾ÉVBA»yªk¡AÁÂÁÂ

[µo°Ý] ½Ð«ü¾ÉVBA»yªk¡AÁÂÁÂ

¸ê®Æ¦pªí®æ¡A­pºâ¬Y¦~¬Y¤ëªº¤é¥­§¡¶q¡C
I2©MJ2¶ñ¤J«á¡A¦Û°Ê·j´M¼Æ¾Ú(·íµM¼Æ¾Ú¥i¥H¦A³vµ§¼W¥[)¥i¥H¦bK2±o¨ìµª®×


Sub finddate()
myrows = Worksheets("¤u§@ªí1").Cells(Rows.Count, 1).End(x1down).Row
For i = 2 To myrows
    If Year(Cells(i, 1)) = Cells(2, 9).Value And Month(Cells(j, 1)) = Cells(2, 10).Value Then
        Cells(2, 12) = Cells(i, 2)
    End If
Next
End Sub

¸ê®Æ¦pªí®æ¡A­pºâ¬Y¦~¬Y¤ëªº¤é¥­§¡¶q¡C
I2©MJ2¶ñ¤J«á¡A¦Û°Ê·j´M¼Æ¾Ú(·íµM¼Æ¾Ú¥i¥H¦A³vµ§¼W¥[)¥i¥H¦bK2±o¨ì ...
idnoidno µoªí©ó 2015-4-15 23:14


¸É¤Wªþ¥ó

YM-test1.rar (16.2 KB)

YY

TOP

¦^´_ 2# idnoidno
¸Õ¸Õ
  1. Sub finddate()
  2. myrows = Worksheets("¤u§@ªí1").Cells(Rows.Count, 1).End(xlUp).Row
  3. ¤é´Á = [i2] & "/" & [j2]
  4. For i = 2 To myrows
  5.     If ¤é´Á = Format(Cells(i, "A"), "yyyy/mm") Then
  6.         Cells(2, 12) = Cells(i, 2)
  7.     End If
  8. Next
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# idnoidno
­Y§A©Ò¿×ªº¤é¥­§¡«üªº¬O¨C­Ó¤Hªº§Ûªí¼Æ¦r
«h¥i¨Ï¥Î¦¹µ{¦¡½X,¤Þ¥Î¼Ó¤W¤j¤jªºµ{¦¡½X°µ¼W¥[
  1. Sub finddate()
  2. myrows = Worksheets("¤u§@ªí1").Cells(Rows.Count, 1).End(xlUp).Row
  3. ¤é´Á = [i2] & "/" & [j2]
  4. For i = 2 To myrows
  5.     If ¤é´Á = Format(Cells(i, 1), "yyyy/mm") Then
  6.         temp = 0
  7.         For j = 2 To 7
  8.             temp = temp + Cells(i, j)
  9.         Next
  10.         [k2] = temp / 6
  11.     End If
  12. Next
  13. End Sub
½Æ»s¥N½X
PKKO

TOP

¦¬¨ì¡A®ø¤Æ¤¤¡A¤£¹L¯uªº¨S·Q¨ì³o¼Ë¥i¥H³B²z³á¡A¯uªº¤Q¤ÀÁÂÁÂ

TOP

½Ð°Ý¼Ó¤W¨â¦ì¤j¤j
§ÚTRYªºµ²ªG
¤é´Á¦n¹³¤ñ¹ï¤£¥X¨Ó­C
¬O¤£¬O§Ú­þÃ䦳ª¬ªp¨S³B²z©O

TOP

§Úªº·N«ä¬O
¤é´Á = Format(Cells(i, "A"), "yyyy/mm")
´ú¸Õµ²ªG¦n¹³¤ñ¹ï¤£¥X¨Ó

TOP

Format(Cells(i, "A"), "yyyy/mm")
¹Bºâ¥X¨Ó¬O2014/03
¤é´Á¬O2014/3
©Ò¥H¤ñ¹ï¤£¥X¨Ó

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-4-16 13:52 ½s¿è

¦^´_ 7# idnoidno

¤U¹Ï¬O§A¤W¶ÇªºÀɮרS­×§ï¹L¡A
¥i¥H¤ñ¹ï¦¨¥\
¸Ì­±§Ú¦h¤@­ÓÅܼÆ"AÄæÀx¦s®æ"¬OÆ[¹îÅܼƥΪº,¥i§R°£
   

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-4-16 13:56 ½s¿è

¦^´_ 8# idnoidno


    ­Y¤£­n0X¤ë¡A¤]¥i¥H"yyyy/m"
´N·|¬O3¤ë¤F¤£·|¬O03¤ë¡A10¤ë¤]·|¬O10¤ë

TOP

        ÀR«ä¦Û¦b : ¤£­n¤p¬Ý¦Û¤v¡A¦]¬°¤H¦³µL­­ªº¥i¯à¡C
ªð¦^¦Cªí ¤W¤@¥DÃD