オブジェクト以下のコードは、あなたが記述何をします追加する必要があります。最初に定数を使用して、1つの列に移動する列と行の数を設定します(TargetColNo)。スキャンした各列の後に空のセルが追加されます。
テキストファイルに保存する場合は、このコードを使用してテキストファイルを追加して、列の代わりに結果を追加します。
Sub Rows2OneColumn()
Const StartColumnNo = 1 ' Start at column A
Const EndColNo = 3 ' End at column C
Const StartRowNo = 1 ' Start at row 1
Const EndRowNo = 5 ' End at row 5
Const TargetColNo = 5 ' Put result in column E
Dim source_row As Integer
Dim source_col As Integer
Dim target_row As Integer
target_row = 1
For source_col = StartColumnNo To EndColNo
For source_row = StartRowNo To EndRowNo
Cells(target_row, TargetColNo).Value = Cells(source_row, source_col).Value
target_row = target_row + 1
Next
target_row = target_row + 1 ' leave one cell empty
Next
End Sub
あなたの質問をより具体的に教えてください。たとえば、どの形式がExcelで、どの形式を.txt形式でエクスポートするか説明してください。 – paul
これはメモ帳++マクロのように聞こえます。 – jivko
[Excel - 複数の列を1つの列にまとめる](https://stackoverflow.com)/questions/2977660/excel-combine-multiple-columns-into-one-column) – YowE3K