+ Reply to Thread
Results 1 to 4 of 4

insert text around each word

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    insert text around each word

    Well I recently received a CSV file from a friend to import some products into my site. I'm using Excel to edit the file so that the file can be useful to me.

    On on of the columns in this file, there are links to images.

    For example in one column there are 2 image urls formatted like so :

    http://sitename.com/12.jpg http://sitename.com/13.jpg

    Now for this to be useful to me, I need to convert that cell into :
    <IMG src="http://sitename.com/12.jpg"> <IMG src="http://sitename.com/12.jpg>

    Now I know it's possible to add text at the beginning and the end of a cell, but what I'd end up with is <IMG src="http://sitename.com/12.jpg http://sitename.com/13.jpg> which isn't right.
    I should also mention sometimes there's only 1 url and at other times there are 2 or 3.

    Thank you for your time

    So what I want to know is if there's a formula which would "wrap" each word (in this case the url) with certain characters.
    Last edited by desertshift; 06-23-2010 at 08:08 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need help, does such a formula exist ?

    Welcome to the forum,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: insert text around each word - does such a formula exist ?

    Thanks for taking the time to read and comply with the rule .

    Try:

    =SUBSTITUTE(SUBSTITUTE(A1,"http","<IMG src=""http"),".jpg",".jpg"">")

    where A1 contains original string.
    Last edited by NBVC; 06-23-2010 at 08:09 AM. Reason: Removed double "canned" reply.

  4. #4
    Registered User
    Join Date
    06-22-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: insert text around each word

    Solved, thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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