Extract all delimited Word <b>…</b>

pociners

New Member
Joined
Mar 19, 2014
Messages
32
Hi.. everyone,

I have a problem in extracting word in MS Excel. I have a multiple sentences with HTML Format in row and want to extract all of the word that has been delimited with
Code:
[COLOR=#303336][FONT=Consolas][FONT=inherit]<[/FONT][/FONT][/COLOR][COLOR=#303336][FONT=Consolas][FONT=inherit]b[/FONT][/FONT][/COLOR][COLOR=#303336][FONT=Consolas][FONT=inherit]>...< /<!--"<!--</span---->[/FONT][/FONT][/COLOR][COLOR=#303336][FONT=Consolas][FONT=inherit]<!--</span-->[/FONT][/FONT][/COLOR][COLOR=#303336][FONT=Consolas][FONT=inherit]b[/FONT][/FONT][/COLOR][COLOR=#303336][FONT=Consolas][FONT=inherit]>[/FONT][/FONT][/COLOR]
Below is the example word:
Code:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">[COLOR=#303336][FONT=inherit]<[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit]buat<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]< /[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<[/FONT][/COLOR][COLOR=#303336][FONT=inherit]i[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit]v[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=inherit]i[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]1<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]< /[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit] kerjakan[/FONT][/COLOR][COLOR=#303336][FONT=inherit];[/FONT][/COLOR][COLOR=#303336][FONT=inherit] lakukan[/FONT][/COLOR][COLOR=#303336][FONT=inherit];[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]2<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]< /[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit] bikin[/FONT][/COLOR][COLOR=#303336][FONT=inherit];<[/FONT][/COLOR][COLOR=#303336][FONT=inherit]br[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>--<[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR][COLOR=#303336][FONT=inherit]cendol<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=inherit]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]<!--</span-->[/FONT][/COLOR][COLOR=#303336][FONT=Consolas]< /[/FONT][/COLOR][COLOR=#303336][FONT=inherit]b[/FONT][/COLOR][COLOR=#303336][FONT=inherit]>[/FONT][/COLOR]</code>

and I want to extract the words: "buat", "1", "2", "cendol"

Can you help me to solve my problem? Any code in excel/ vba is appreciated

Thanks,
Budyono
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Assuming you do not really have a space in "< /b>" within your text, you can use this function to retrieve the words between the bold tags...
Code:
Function GetBolds(ByVal S As String) As String
  Dim X As Long, Arr As Variant
  Arr = Split(Replace(S, "</b>", "<b>"), "<b>")
  For X = 1 To UBound(Arr) Step 2
    GetBolds = GetBolds & ", " & Arr(X)
  Next
  GetBolds = Mid(GetBolds, 3)
End Function
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,548
Members
449,038
Latest member
Guest1337

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