LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default String manipulation

Hi all,

In a column of cells, I have names in the format:

Bird, Stephan
May, Theresa
Trump, Donald
Putin, Vladimir
Duck, Donald
Mouse, Mickey

I'd like to manipulate these into another cell - hyperlinked to "https://
www.ncbi.nlm.nih.gov/pubmed/?term=Bird S[au]" with display text "S Bird
Publications" (for the first example)

I have come up with a long winded set of concatenations - HYPERLINK
(CONCATENATE("https://www.ncbi.nlm.nih.gov/pubmed/?term=",(LEFT(CELL,(FIND
(",",CELL,1))-1)),"+",LEFT((RIGHT(CELL,(LEN(CELL)-((FIND(",",CELL,1))
+1)))),1),"[au]"),CONCATENATE(LEFT(RIGHT(CELL,(LEN(CELL)-(FIND(",",CELL,1)
+1))),1)," ",LEFT(CELL,FIND(",",CELL,1)-1)," Publications"))

but wonder if there's a neater way of avoiding all the LEFTs and RIGHTs?

Surnames may be double barrelled, and there may be more than one forename
which may cause some things to fail. I'd rather use standard built-ins
from Excel (as early as 2003) and not use other cells as intermediates
(which is probably why this is a bit ugly - it was built piecewise from
various manipulations)

I know about swapping & in for concatenate but have not implemented it
yet.

Kind regards

Stephan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
STRING MANIPULATION !! jay dean Excel Programming 1 April 27th 09 10:43 AM
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) Brian Excel Programming 3 February 9th 06 03:38 PM
Importing Long String - String Manipulation (EDI EANCOM 96a) Brian Excel Programming 6 February 9th 06 12:27 PM
String manipulation!! Mannyluk Excel Programming 2 October 18th 04 12:42 PM
VBA String manipulation Chip Pearson Excel Programming 0 March 4th 04 11:02 PM


All times are GMT +1. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"