How do I remove the last 4 characters within a cell

P

Problem poser

I have copied hundreds of .jpg file names, using DOS, to copy them into a
listing within a worksheet. As a substantial amount are numeric with a file
extension I would like to split the cells to remove file extension to give me
a numeric result.

i.e.
"123.jpg" into a numeric "123" or "Many files.jpg" into "Many files"

The file names are variable in size and are either numeric or just characters
Thank you
 
M

muddan madhu

try this

=SUBSTITUTE(A1,".jpg","")

or

Select the column
Go to Data | text column | delimited | next | choose other option :
put an dot | next
select the jpg column in data preview | choose do not import (skip)
option | finish |
 
A

Angela in Virginia

Since there are different lengths, I would use Ctrl+H
replace: .jpg
with: (leave this blank)
Replace All
 
P

Problem poser

Thank you Angela, Mike and Muddan
This is the first time that I have used this discussion group
All answers work and "I am impressed"with the time to respond.

Thank you again

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top