from to 3 rows to 12 rows (please macro or formula)

S

Serdar Olgun

I want to convert


A) is B) are C) am D) be
A) Your / surname B) My / surname C) I / surname D) I / name
A) My am B) I is C) I am D) I

TO

A) is
B) are
C) am
D) be
A) Your / surname
B) My / surname
C) I / surname
D) I / name
A) My am
B) I is
C) I am
D) I
 
S

Serdar Olgun

solved thank you


Sub Convert()
Dim arr
Dim i As Long, EndR1 As Long, EndR2 As Long

With Sheets("Sayfa1")
EndR1 = .Range("A65000").End(xlUp).Row
For i = 1 To EndR1
arr = Split(.Range("A" & i).Value, " B)")
EndR2 = .Range("C65000").End(xlUp).Row
If EndR2 = 1 Then EndR2 = 0
..Range("C" & EndR2 + 1).Value = arr(0)
arr = Split(arr(1), " C)")
..Range("C" & EndR2 + 2).Value = "B)" & arr(0)
arr = Split(arr(1), " D)")
..Range("C" & EndR2 + 3).Value = "C)" & arr(0)
..Range("C" & EndR2 + 4).Value = "D)" & arr(1)
Next i
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top