Visual Basic GetAddress (Hyperlink) from Excel String -


i have vb in excel extracts hyperlink pasted cell:

function getaddress(hyperlinkcell range) string if hyperlinkcell.hyperlinks.count > 0 getaddress = replace(hyperlinkcell.hyperlinks(1).address, "mailto:", "nothing here") else getaddress = "" end if end function 

the problem strips in hyperlink after # e.g.

http://en.wikipedia.org/wiki/technical_support#tier.2flevel_1_.28t1.2fl1.29

becomes

http://en.wikipedia.org/wiki/technical_support

any suggestions on how request whole string?

how about:

function getaddress(hyperlinkcell range) string     if hyperlinkcell.hyperlinks.count > 0         getaddress = replace(hyperlinkcell.hyperlinks(1).address, "mailto:", "nothing here")         getaddress = getaddress & "#" & hyperlinkcell.hyperlinks(1).subaddress     else         getaddress = ""     end if end function 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -