Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a very long worksheet list with contact information of various companies and I need to create usernames for them, so I would use the middle part of their website URL for those. For example, in cell B1 I have and I want to copy the yourdomain part to cell A1.

Many websites may have a different top-level domain than .com, but all of them start with 'www.', in the case of '' I would only need the 'yourdomain' part, so from the first dot till the next dot.

Is there a function to accomplish this?

share|improve this question

Not tested in OpenOffice but the following should work and may tide you over until better answers are offered. Use the formula in A1 as shown (copy down as necessary):

SU490624 example

The formula is a little convoluted, so I have shown a way to build it up piece by piece which may also be a help in explaining it.

[Assumes a maximum initial string length of about 50 characters.]

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.