+ Reply to Thread
Results 1 to 8 of 8

Combine multi-columns into one signle column with open and close html <li>tag insertion

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Monterey Park, Ca
    MS-Off Ver
    Excel 2010
    Posts
    41

    Combine multi-columns into one signle column with open and close html <li>tag insertion

    Hi All,

    I need to combine around 20 columns into one single column, then I also need to insert open and close html tag for each column moved. See attachment example or information below

    BULLET 1, BULLET 2, BULLET 3, BULLET 4, BULLET 5 ====> DESCRIPTION:

    DESCRIPTION COLUMN
    <ul>
    <li>BULLET 1</li>
    <li>BULLET 2</li>
    <li>BULLET 3</li>
    <li>BULLET 4</li>
    <li>BULLET 5</li>
    </ul>

    Thank you very much for the big help
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    Hi
    try this user-defined formula

    Please Login or Register  to view this content.

    to use it, copy the code into a module in the vba area, then and in a cell in your sheet type the formula
    =concatenate_range(B6:U6)

    this should return the contents of the specified range deparated as you indicated. You can then copy this like a normal formula to create a strong from other rows

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    Monterey Park, Ca
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    Thank you very much, NickyC. Truly appreciated it....

  4. #4
    Registered User
    Join Date
    09-20-2012
    Location
    Monterey Park, Ca
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    Hi NickyC,

    Just tested the form, everything works perfectly fine beside one small problem. The open html tag suppose to be <li> not </li>. Currently the open and close both showing </li>BULLET 1</li>, not <li>BULLET 1</li>

    Correct way:
    <ul>
    <li>BULLET 1</li>
    <li>BULLET 2</li>
    <li>BULLET 3</li>
    <li>BULLET 4</li>
    <li>BULLET 5</li>
    </ul>

    Can you show me how to edit the code to make such change? Thanks

  5. #5
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    Hi
    try this version:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-20-2012
    Location
    Monterey Park, Ca
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    Will do

    Appreciated!!!

  7. #7
    Registered User
    Join Date
    09-20-2012
    Location
    Monterey Park, Ca
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    If txt <> "" Then txt = txt & "</li>" & "<li>" & CCell Else txt = txt & "<li>" & CCell

    I switched to

    If txt <> "" Then txt = txt & "<li>" & "</li>" & CCell Else txt = txt & "<li>" & CCell

    IT'S WORKING AND WORKS LIKE A CHAMP, THANKS.

    Last edited by juno612; 01-13-2014 at 03:50 AM.

  8. #8
    Registered User
    Join Date
    09-20-2012
    Location
    Monterey Park, Ca
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Combine multi-columns into one signle column with open and close html <li>tag insertio

    If txt <> "" Then txt = txt & "</li>" & "<li>" & CCell Else txt = txt & "<li>" & CCell

    I switched to

    If txt <> "" Then txt = txt & "<li>" & "</li>" & CCell Else txt = txt & "<li>" & CCell

    IT'S WORKING AND WORKS LIKE A CHAMP, THANKS.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. freezing a column from insertion of other columns
    By sara ghaith in forum Excel General
    Replies: 2
    Last Post: 12-16-2013, 04:23 PM
  2. 1 column into multi-columns and multi-rows
    By affj in forum Excel General
    Replies: 7
    Last Post: 07-17-2013, 09:34 AM
  3. Cut and paste rows in a signle column to another sheet
    By rrogoski in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2013, 01:20 PM
  4. Macro to open website (from Url in column A) and save as html
    By Flabbergaster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2013, 05:42 PM
  5. Application Open/Close Event - Store Open and Close Times?
    By mccrimmon in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2011, 04:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1