Convert text to column

mrcris

New Member
Joined
Oct 31, 2018
Messages
9
Hi guys, i want to conver the data on A1 to separate question and answer as expectation. Could you help me to resolve it? I have many record like A1, i want to automatic. Thanks.


nf7suj
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 956"]
<tbody>[TR]
[TD="class: xl65, width: 956"]1. Which of the following applications/software can be used to create a favicon?

a) Unity

b) Adobe Photoshop

c) Dreamweaver

d) VLC

View Answer[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 956"]
<tbody>[TR]
[TD="class: xl65, width: 956"]Expected:[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 956"]
<tbody>[TR]
[TD="class: xl65, width: 956"]Which of the following applications/software can be used to create a favicon?[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 71"]
<tbody>[TR]
[TD="class: xl65, width: 71"]Unity[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 120"]
<tbody>[TR]
[TD="class: xl65, width: 120"]Adobe Photoshop[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 97"]
<tbody>[TR]
[TD="class: xl65, width: 97"]Dreamweaver[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 70"]
<tbody>[TR]
[TD="class: xl65, width: 70"]VLC[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
i am not sure that what u want
but try with this :
Code:
Sub test()    Dim Cell As Range
    Dim Plage As Range
    Set Plage = Range("A2:A100") ' à adapter
    For Each Cell In Plage
    Cells(Cell.Row, 2) = Replace(Cell.Value, Chr(10), "")
    Next
    
    Dim Tableau
    Dim i As Integer
    Dim j As Integer
    Dim L As Long
    With Sheets("Feuil1")
    L = .Range("B" & Rows.Count).End(xlUp).Row
    Z = 2
    For j = 2 To L
    Tableau = Split(.Cells(j, 1), "a)")
     .Cells(j, 2) = Tableau(0)
    Next j
    End With
    
    
End Sub
 
Upvote 0
Maybe something like....

Code:
Sub mrcris()
    Columns("A:A").TextToColumns Destination:=Range("B5"), DataType:=xlDelimited, _
        TextQualifier:=xlNone, Other:=True, OtherChar _
        :="" & Chr(10) & "", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, _
        1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1)), _
        TrailingMinusNumbers:=True
End Sub
 
Upvote 0
I tried with alt + f11 and paste the code, how to apply to the excel? I didn't know, thanks guys for support me.
 
Upvote 0
Put the cursor within the code and click F5 or click Run - Run Sub/Userform or from the worksheet ALT+F8, click the name of the macro and click run.
.
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,601
Members
452,658
Latest member
GStorm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top