Solved

How remove all characters after a period including the period

Posted on 2014-03-31
3
222 Views
Last Modified: 2014-03-31
I several cell in a column I have data that reads for example:

04022.xls
or
05123.xls
or
123456.xls (note six numbers before the dot)
or
1234.xls (note four numbers before the dot)

I want to keep everything BEFORE the dot and paste it in a new column to the right of the existing column.  How can I do this?

--Steve
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 39967037
Assuming your data starts in cell A2, put this formula in B2, copy down all the way then do a copy / paste values. FIND finds the position of the dot, and left returns the characters left of that position.

=LEFT(a2, find(".",A2)-1)

Thomas
0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39967048
Hi,

select the column and press Ctrl+H

Type in find:     .*               (dot and Star only)
keep replace as blank.

and click on replace All.
0
 
LVL 39

Expert Comment

by:nutsch
ID: 39967057
For Santosh's solution, copy your data to a new column first and select that new column before the Replace (Ctrl+H) if you want the tweaked data in a separate column.

Thomas
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

688 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