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

ªí³æ¨Ì«ü©wÄæ¦ì­«±Æ¥¨¶°°ÝÃD

¥»©«³Ì«á¥Ñ register313 ©ó 2012-5-7 20:28 ½s¿è

¦^´_ 1# lionliu
  1. Sub xx()
  2. Dim Ar(), Br()
  3. Ar = Array("item", "name", "color", "po no", "qty")
  4. R = [A65536].End(xlUp).Row
  5. For i = 0 To UBound(Ar)
  6.   x = Application.Match(Ar(i), [A1:E1], 0)
  7.   ReDim Preserve Br(i)
  8.   Br(i) = Application.Transpose(Range(Cells(1, x), Cells(R, x)))
  9. Next i
  10. [A1].Resize(R, 5) = Application.Transpose(Br)
  11. End Sub
½Æ»s¥N½X

1.jpg (73.99 KB)

1.jpg

TOP

¦^´_ 3# lionliu

R = [A65536].End(xlUp).Row
¨ú±oAÄæ³Ì«á¤@­ÓÀx¦s®æ¤§¦C¸¹

RANGE("A" & [A65536].End(xlUp).Row)
¨ú±oAÄæ³Ì«á¤@­ÓÀx¦s®æ¤§­È

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD