String length variable in length but delete last 4 chars

matthewjapp

Board Regular
Joined
May 14, 2007
Messages
115
Hi there,

I know my left/right/len etc

But...

I have arange of values in A ranging from 5 to 100 chars

How do I delete the last 4 chars of each cell (these chars appear in the string in various points so cannot just do a ctrl + h..

Answers greatly appreciated!

Matt
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I don't think you've been specific enough in what you're asking, as intuitively, I'd think you'd just need:
Code:
=LEFT(A1,LEN(A1)-4))
But you say you know about the LEFT and LEN functions.

Can you post an example of your data or be more precise in where the problem lies?

Unless you have values less than 4 characters long, in which case, try:
Code:
IF(LEN(A1)>=4,LEFT(A1,LEN(A1)-4)),A1)
 
Last edited:
Upvote 0
thanks, but figured that and have had my moment of personal disgust at having to post here for that one ha ha ta!
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,408
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top