?
Solved

in excel how to do I convert a long name to a short name ?

Posted on 2011-04-28
7
Medium Priority
?
244 Views
Last Modified: 2012-05-11
I have a cell
yada.nasa.gov

I want to just return "yada".

0
Comment
Question by:TIMFOX123
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 35483141
Assuming text in A1:
=LEFT(A1,search(".",A1)-1)
in another cell.
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35483155
=LEFT(A1,FIND(".",A1,1)-1)

Assuming that the data is in Cell A1, put this formula in cell B1

Sid
0
 
LVL 21

Expert Comment

by:Alan
ID: 35483165
Hard to give a general formula if you only give one single example, but how about this (yada.nasa.gov is in A1):

=LEFT(A1,FIND(".",A1&".")-1)


Alan.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 21

Expert Comment

by:Alan
ID: 35483177
Not trying to be pedantic, but I would just point out that the other two answers give an error if there is no "." in the string.  Unless you *want* an error in that case, best practice is to do it the way I set out.

Alan.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35483218
But since we don't know either way... ;)
0
 

Author Closing Comment

by:TIMFOX123
ID: 35483684
this works and saves my bacon
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35483788
Thank you Tim :)

Sid
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question