0
これまでに6つの分割セル(コロン記号を使用)を同じ列に管理しています。上記の追加データがある場合はいつでも標準化しようとしています(つまり、最後の行が50の場合、最初の行は44です)。 (失敗したけど)VBA:最後の6行の ":"の後にセルを分割します。
Dim fullstring As String, colonposition As Integer, j As Integer
For i=1 to 6
fullstring = Cells(j, 1).Value
colonposition = InStr(fullstring, ":")
Cells(j, 2).Value = Mid(fullstring, colonposition + 2)
Cells(j, 1).Value = Left(fullstring, colonposition - 1)
Next j
私もこれを試してみました
VBAは、最後の行1行を選択するために続行する方法のよう
Dim fullstring As String, colonposition As Integer, j As Integer, LastRow as Long, FirstRow as Long
LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
FirstRow = LastRow - 6
For j = FirstRow To EndRow
fullstring = Cells(j, 1).Value
colonposition = InStr(fullstring, ":")
Cells(j, 2).Value = Mid(fullstring, colonposition + 2)
Cells(j, 1).Value = Left(fullstring, colonposition - 1)
Next
どんな提案を次のように
私のコードです=最後の行 - 6?
これは頼むことがたくさんあってもよいが、どのようにあなたがに行くか:行の(以前のように)各セルを分割、最後の行を見つけ、その下の最後の行の前半と後半を返します行? – pdx
http://stackoverflow.com/questions/38349177/vba-split-cells-and-display-results-below – pdx
あなたは答えとしてこれを受け入れておらず、コメントに追加の質問をしました。どのようにあなたを感心?ちょうどキッド。 :)私は私のマシンに着くときにそれを調べます。 – cyboashu