fatfreddie
New Member
- Joined
- Feb 2, 2011
- Messages
- 16
Ladies, Gentlemen
I have following task:
I have description of thousands of movies in excel table format.
There is one column for directors names and one for actors names.
Each cell in these columns may contain none, one or more names, if more than one they are separated by commas.
say
A2=Sarah Miles, Joss Ackland, Greta Scacchi, Charles Dance, Geraldine Chaplin
I need to "linkyfy" them - convert each of these names into fargments of html so when they are published in a online shop they become links to search results containing themselves, ie
Sarah Miles becomes
so it will look like
Sarah Miles
But all names in a result must be still in one cell, separated by commas as in the source so A2 becomes:
so it looks like this:
Sarah Miles, Joss Ackland, Greta Scacchi, Charles Dance, Geraldine Chaplin
So far I have managed to do it by splitting these cells to columns by commas, applying concatenate with parts of the "link" to each one separately then merging them together.
Very messy and headache inducing procedure (and error prone too).
What I need is a formula that for given structure of the "link" say:
could be applied in one go to a range of cells containing these names.
Please note in firts part of the link the spaces have to be replaced by "+"
Also, if the cell is empty we skip it.
As you know by now I am not an Excel expert by no means so every bit of help will be appreciated
Thank you
Fred
I have following task:
I have description of thousands of movies in excel table format.
There is one column for directors names and one for actors names.
Each cell in these columns may contain none, one or more names, if more than one they are separated by commas.
say
A2=Sarah Miles, Joss Ackland, Greta Scacchi, Charles Dance, Geraldine Chaplin
I need to "linkyfy" them - convert each of these names into fargments of html so when they are published in a online shop they become links to search results containing themselves, ie
Sarah Miles becomes
HTML:
<a href="/search.php?subcat=&text=Sarah+Miles" target="_blank">Sarah Miles</a>
Sarah Miles
But all names in a result must be still in one cell, separated by commas as in the source so A2 becomes:
HTML:
<a href="/search.php?subcat=&text=Sarah+Miles" target="_blank">Sarah Miles</a>, <a href="/search.php?subcat=&text=Joss+Ackland" target="_blank">Joss Ackland</a>, <a href="/search.php?subcat=&text=Greta+Scacchi" target="_blank">Greta Scacchi</a>, <a href="/search.php?subcat=&text=Charles+Dance" target="_blank">Charles Dance</a>, <a href="/search.php?subcat=&text=Geraldine+Chaplin" target="_blank">Geraldine Chaplin</a>
Sarah Miles, Joss Ackland, Greta Scacchi, Charles Dance, Geraldine Chaplin
So far I have managed to do it by splitting these cells to columns by commas, applying concatenate with parts of the "link" to each one separately then merging them together.
Very messy and headache inducing procedure (and error prone too).
What I need is a formula that for given structure of the "link" say:
HTML:
<a href="/search.php?subcat=&text=FIRSTNAME+MIDDLENAME+SECONDNAME" target="_blank">FIRSTNAME MIDDLENAME SECONDNAME</a>
could be applied in one go to a range of cells containing these names.
Please note in firts part of the link the spaces have to be replaced by "+"
Also, if the cell is empty we skip it.
As you know by now I am not an Excel expert by no means so every bit of help will be appreciated
Thank you
Fred
Last edited: