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

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

¦^´_ 8# idnoidno

Åý¥L¤ñ¹ï¦¨¥\«áµ²§ôµ{§ÇSub
  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.     AÄæÀx¦s®æ = Format(Cells(i, "A"), "yyyy/m")
  6.     If ¤é´Á = Format(Cells(i, "A"), "yyyy/m") Then
  7.         Cells(2, 12) = Cells(i, 2)
  8.         End '¥[³o­ÓEnd¤ñ¹ï¦¨¥\«á´Nµ²§ôµ{§Ç
  9.     End If
  10. Next
  11. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ¡A¯uªº¬O¦³°Ý¦³µª¦³¾Ç¨ì

TOP

¦A½Ð¯q¡A¥H¤Uªº°ÝÃD
Äæ¦ì¥Ò¤A¤þ¤B¥³µ¥µ¥¬Æ¦ÜÀH®ÉÄæ¦ì¥i¦A¼W¥[®É
­pºâ²Å¦X¤é´Á(EX:2014/8)ªº"(·í¤ë§Ûªí¶q-«e¤@­Ó¤ëªº§Ûªí¶q)/¤é¼Æ"
§â­pºâ¥Ò¤A¤þ¤B........ªº"(·í¤ë§Ûªí¶q-«e¤@­Ó¤ëªº§Ûªí¶q)/¤é¼Æ"­pºâµ²ªG¼g¨ì¤U¤@­Ó¤u§@ªí¤º
ªº¸Ñ¨M¤èªk
¤p§Ì¥¿¦b·Q¦p¦ó°µ¡A±ßÂI·|§âªì·QªkPO¥X
ÁÂÁÂ

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

  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

¦^´_ 15# idnoidno


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

TOP

¦^´_ 15# idnoidno


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

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

¦^´_ 18# idnoidno


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

YM-test.rar (24.67 KB)

YMTEST

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

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD