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

[µo°Ý] Âà¸m§xÂZ

[µo°Ý] Âà¸m§xÂZ

§Ú¦b¤U¦CVBA¤º¤@ª½³QA©Ò§xÂZ, ¦Ó¥B

a = Application.match(Sheets("201507").Range("A" & i), Sheets("data").Range("D:D"), 0) ->¤@ª½¥X²{°ÝÃD

Set rangeFilledWithTransposedData = Sheets("201507").Range("e3:e31") ->¤£ª¾¦p¦ó¥i¥HÅܦ¨ÅܼÆ, ¹ïÀ³201507ªºID.



Sub match()

Dim i As Integer
Dim a As Integer
Dim transposedVariant As Variant
Dim sourceRowRange As Range
Dim sourceRowRangeVariant As Variant
Dim finalrow As Integer


Sheets("201507").Activate
Sheets("201507").Range("e:e").Select
Selection.ClearContents

finalrow = Cells(Rows.Count, 1).End(xlUp).Row

For i = 3 To finalrow

   a = Application.match(Sheets("201507").Range("A" & i), Sheets("data").Range("D:D"), 0)

    Set sourceRowRange = Sheets("data").Range("H" & a & ":AL" & a)
    sourceRowRangeVariant = sourceRowRange.Value
    transposedVariant = Application.Transpose(sourceRowRangeVariant)

    Dim rangeFilledWithTransposedData As Range
    Set rangeFilledWithTransposedData = Sheets("201507").Range("e3:e31")
    rangeFilledWithTransposedData.Value = transposedVariant
   
Next i

i = i + 1


End Sub
[/code]

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD