Search code examples
excelexcel-formulaconcatenationexport-to-csvworksheet-function

How to replace regular text in Excel into HTML unordered list (for export to CSV)?


How can I convert a specific column in an Excel sheet to HTML unordered list? Make it go from this:

Item 1
Item 2
Item 3

to:

<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>

I've searched the web and can't find anything even remotely close to the solution.


Solution

  • Assuming data is in ColumnA, in another column:

    ="<li>"&A1&"</li>"
    

    copied down to suit, add <ul> at the top, </ul> at the bottom, select the another column Copy, Paste Special, Values over the top and delete ColumnA.