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

¤å¦r¦ê±µ»yªk²¤Æ¤Î©µ¦ù½Ð¯q

¤å¦r¦ê±µ»yªk²¤Æ¤Î©µ¦ù½Ð¯q

¥H¤U¬O¤p§Ì©å¦Hªº»yªk¡A·Q½Ð°Ý¦p¦ó²¤Æ...¥t¥~·Q½Ð°Ý¤j¤jªº¬O­Y¤é«á¸ê®Æ¶q¤£¥u¨ì²Ä¥|¦C¡A¦p¦ó³z¹L»yªk¦Û°Ê§PŪ¸ê®Æ¶q¨ì²Ä´X¦C¡A´N°j°é¨ì³Ì«á¤@¦C¡C¬O§_¬OFor...Next »yªk©O?
ÁÂÁ¤j¤j­Ì¡C


Sub ¤å¦r¦ê±µ»yªk()

Worksheets("·Q­nªºtxtÀÉ").Range("a1") = Worksheets("­ì©lexcelÀÉ®×").Range("a1") & Worksheets("­ì©lexcelÀÉ®×").Range("b1") & Worksheets("­ì©lexcelÀÉ®×").Range("f1")

Worksheets("·Q­nªºtxtÀÉ").Range("a2") = Worksheets("­ì©lexcelÀÉ®×").Range("a2") & Worksheets("­ì©lexcelÀÉ®×").Range("b2") & Worksheets("­ì©lexcelÀÉ®×").Range("f2")

Worksheets("·Q­nªºtxtÀÉ").Range("a3") = Worksheets("­ì©lexcelÀÉ®×").Range("a3") & Worksheets("­ì©lexcelÀÉ®×").Range("b3") & Worksheets("­ì©lexcelÀÉ®×").Range("f3")

Worksheets("·Q­nªºtxtÀÉ").Range("a4") = Worksheets("­ì©lexcelÀÉ®×").Range("a4") & Worksheets("­ì©lexcelÀÉ®×").Range("b4") & Worksheets("­ì©lexcelÀÉ®×").Range("f4")


End Sub

¤å¦r¦ê±µ.zip (6.07 KB)

¦^´_ 1# ¾Ç¨ì¦Ñ¦º
  1. Sub EX()
  2.     Dim xA As Worksheet, xB As Worksheet
  3.     Set xA = ThisWorkbook.Worksheets("­ì©lEXCELÀÉ®×")
  4.     Set xB = ThisWorkbook.Worksheets("·Q­nªºTXTÀÉ®×")
  5.     For i = 2 To xA.Cells(4 ^ 8, 1).End(xlUp).Row
  6.         xB.Cells(i, 1) = xA.Cells(i, 1) & xA.Cells(i, 2) & xA.Cells(i, 6)
  7.     Next i
  8. End Sub
½Æ»s¥N½X
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 1# ¾Ç¨ì¦Ñ¦º

¤U­±¦³3­Ó¼Ò¦¡¡Aµ¹§A°Ñ¦Ò¡A(¦p¡A§Aªº°ÝÃD¤£¥u¤U­±³o3ºØ¼Ò¦¡)
  1. Public Sub Ex()
  2.     Dim ro%, I%
  3.     With Worksheets("­ì©lEXCELÀÉ®×")
  4.         ro = .Cells(Rows.Count, 1).End(xlUp).Row '´M§ä³Ì«á¤@¦Cªº¦C¸¹¡A½Ð¬ÝVBE»¡©ú:Range.End ÄÝ©Ê
  5.         For I = 2 To ro '¥H¦C¸¹°µ°j°é
  6.             Worksheets("·Q­nªºTXTÀÉ®×").Cells(I, "A") = .Cells(I, "A") & .Cells(I, "B") & .Cells(I, "F")
  7.         Next
  8.     End With
  9. End Sub

  10. Public Sub test()
  11.     Dim ro%, Rng As Range
  12.     With Worksheets("­ì©lEXCELÀÉ®×")
  13.         ro = .Cells(Rows.Count, 1).End(xlUp).Row '´M§ä³Ì«á¤@¦Cªº¦C¸¹¡A½Ð¬ÝVBE»¡©ú:Range.End ÄÝ©Ê
  14.         For Each Rng In .Range("A2:A" & ro) '¥Hª«¥ó¬°°j°é
  15.             Worksheets("·Q­nªºTXTÀÉ®×").Cells(Rng.Row, "A") = Rng & Rng.Offset(, 1) & Rng.Offset(, 5)
  16.         Next
  17.     End With
  18. End Sub

  19. Public Sub test1()
  20.     Dim ro%, Rng As Range
  21.     With Worksheets("­ì©lEXCELÀÉ®×")
  22.         ro = 2
  23.         Do Until .Cells(ro, 1) = "" 'A·íÄæ¹J¤WªÅ¥Õ´N¸õÂ÷°j°é
  24.             Worksheets("·Q­nªºTXTÀÉ®×").Cells(ro, "A") = .Cells(ro, "A") & .Cells(ro, "B") & .Cells(ro, "F")
  25.             ro = ro + 1
  26.         Loop
  27.     End With
  28. End Sub
½Æ»s¥N½X

TOP

·PÁ¨â¦ì¤j¤j «ü¾É~

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD