Delete text from strings

alvbnp

Board Regular
Joined
Jun 26, 2006
Messages
180
Sample text in range A:A

ADSDF DSFSA.Z
ASDFS SDF.Z
ASD.Z
ASDF 123 ASDF.Z
ASDF (ASDF).Z
ADSFSDA ASDF.Z 898 ASDF

All strings ended with .Z
Somehow, some strings having additional useless text after the .Z, and I want to delete all of it.
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,955
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Select your column
Hit CTRL-H (Find & Replace)
In Find What, put .Z*
Leave Replace With blank
Click on Replace All
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
As a follow up, if you want to keep the .Z at the end, then follow HotPepper's methodology but for Replace use ".Z" (without the quotes).
 

Watch MrExcel Video

Forum statistics

Threads
1,109,353
Messages
5,528,197
Members
409,807
Latest member
nicky736

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top