ªð¦^¦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

¥»©«³Ì«á¥Ñ idnoidno ©ó 2015-4-16 22:37 ½s¿è

¦^´_ 21# lpk187


­è­è°µ®a¨Æ¡A©Ò¥HÂ÷¶}
¼Æ¾Ú¬O­n¹ïÀ³¨ìªº¤ë¥÷ªº(·í¤ë¶Wªí¶q´î¥h¤W¤@­Ó¤ëªº§Ûªí¶q)°£¥H¤Ñ¼Æ
¤£¬O¤é´Á
©Ò¥H§Úªº­pºâ¦¡¦³ÂI¿ù»~¤F

TOP

¦^´_ 20# lpk187

°õ¦æµ²ªG¦p¤U¡A¬O³o¼Ë¶Ü¡H
   


°õ¦æ®Éµ½¥ÎF8³æ¦æ°õ¦æ¡A¶}±Ò°Ï°ìÅܼƵøµ¡¨ÓÆ[¹îÅܤƷ|§ó®e©öÁA¸Ñ¿ù¦b­þ¸Ì¡I
§â¤£ª¾¹Dªº­È¤Æ¦¨ÅܼƨÓÆ[¹î¨Ò¦p:AAA=Left(Worksheets("¤u§@ªí1").Cells(1, j - 2), 2) & "¤é¥­§¡¶q"

TOP

¦^´_ 19# idnoidno
[A2]=Range("A2")=Cells(2,1),³o¤TºØ¼gªk³£¥i¥H
  1. Sub caldata()
  2. Dim myrow As Integer
  3. Dim mycolumn As Integer
  4. Dim i As Integer
  5. Dim j As Integer
  6. myrow = Worksheets("¤u§@ªí1").Cells(Rows.Count, 1).End(xlUp).Row
  7. mycolumn = Worksheets("¤u§@ªí1").Cells(1, Columns.Count).End(xlToLeft).Column
  8. mydate = Worksheets("¤u§@ªí2").Cells(2, 1) & "/" & Worksheets("¤u§@ªí2").Cells(2, 2)
  9. For i = 2 To myrow
  10.     If mydate = Format(Worksheets("¤u§@ªí1").Cells(i, 1), "yyyy/m") Then
  11.      For j = 4 To mycolumn + 2
  12.         Worksheets("¤u§@ªí2").Cells(1, j) = Left(Worksheets("¤u§@ªí1").Cells(1, j - 2), 2) & "¤é¥­§¡¶q"
  13.         Worksheets("¤u§@ªí2").Cells(2, j) = Format(Worksheets("¤u§@ªí1").Cells(i + 1, 1), "yyyy/m/d")
  14.      Next
  15.      End 'µ²§ôµ{§Ç
  16.     End If
  17. Next
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 18# idnoidno


    §âÀɮתþ¤W
½ÐÀ°¦£¡AÁÂÁÂ

YM-test.rar (24.67 KB)

YMTEST

TOP

½Ð°Ý
¤@¡Bmydate = mysheet2.Cells(1,2) & "/" & mysheets.Cells(2,2)¤¤¡ACells(1,2)©M[a2]·|¤£¤@¼Ë¶Ü
¤G¡B11~13¦n¹³¨S¿ìªk¦b¤u§@ªí¹Bºâ¼g¤J­nªº¤å¦r

TOP

¦^´_ 15# idnoidno


    mydate = Worksheets("¤u§@ªí2").Cells(1.2) & "/" & Worksheets("¤u§@ªí2").Cells(2. 2)À³¸Ó³Ì " , "³rÂI

TOP

¦^´_ 15# idnoidno


    For i = 2 To myrows
¦h¤F¤@­ÓS

TOP

  1. Sub caldata()
  2. Dim myrow As Integer
  3. Dim mycolumn As Integer
  4. Dim i As Integer
  5. Dim j As Integer
  6. myrow = Worksheets("¤u§@ªí1").Cells(Rows.Count, 1).End(xlUp).Row
  7. mycolumn = Worksheets("¤u§@ªí1").Cells(1, Columns.Count).End(xlToLeft).Column
  8. mydate = Worksheets("¤u§@ªí2").Cells(1.2) & "/" & Worksheets("¤u§@ªí2").Cells(2.2)
  9. For i = 2 To myrows
  10.     If mydate = Format(Worksheets("¤u§@ªí1").Cells(1, i), "yyyy/m") Then
  11.      For j = 4 To mycolumn
  12.         Worksheets("¤u§@ªí2").Cells(1, j) = Left(Worksheets("¤u§@ªí1").Cells(1, j - 2), 2) & "¤é¥­§¡¶q"
  13.         Worksheets("¤u§@ªí2").Cells(2, j) = Worksheets("¤u§@ªí1").Cells(1, i + 1)
  14.      Next
  15.     End If
  16. Next
  17. End Sub
½Æ»s¥N½X
«e¤@­Ó¦³¿ù
³o¤@­Ó½Ð«ü¥¿
ÁÂÁÂ

TOP

  1. Sub caldata()
  2. mysheet1 = Worksheets("¤u§@ªí1")
  3. mysheet2 = Worksheets("¤u§@ªí2")
  4. myrow = mysheet1.Cells(Rows.Count, 1).End(x1updown).Row
  5. mycolumn = mysheet2.Cells(1, colunn.Count).End(x1tpleft).Column
  6. mydate = mysheet2.Cells(1.2) & "/" & mysheets.Cells(2.2)
  7. For i = 2 To myrows
  8.     If mydate = Format(Cells(1, "a"), "yyyy/m") Then
  9.      For j = 4 To mycolumn
  10.         mysheet2.cells(1.j)=left(mysheet1.cells(1,j-2),2) & "¤é¥­§¡¶q"
  11.      Next
  12.     End If
  13. Next
  14. End Sub
½Æ»s¥N½X
¦^´_ 13# idnoidno

¦³ÂI°ÝÃD
½Ð¤j¤j«üÂI
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : µoµÊ®ð¬Oµu¼ÈªºµoºÆ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD