How do I delete the last two letters of a cell

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

For example,

I have cells that have 1081004BR IN THEM

I need to take the BR off of it. Is there a way to do this
without have to convert it to text file and then do the
fixed width thing.

Thanks
Steve
 
Steve said:
For example,

I have cells that have 1081004BR IN THEM

I need to take the BR off of it. Is there a way to do this
without have to convert it to text file and then do the
fixed width thing.

Thanks
Steve

Hi Steve,

One way would be to use Find/Replace:

1) Select your cells or range
2) Edit > Replace
3) Find what > BR
4) Replace with > leave blank
5) Check Match Case, if applicable
6) Click on Replace All

Hope this helps!
 
Hi
try the following macro (will process the current selection):
sub foo()
dim rng as range
dim cell as range
set rng = selection
for each cell in rng
if len(cell.value)>1 then
cell.value=Left(cell.value,Len(cell.value)-2)
end if
next
end sub
 
Do all cells have 1081004br?

If so, select the area, Edit, Find, enter br in box, Replace, leave box blank,
Replace all


: For example,
:
: I have cells that have 1081004BR IN THEM
:
: I need to take the BR off of it. Is there a way to do this
: without have to convert it to text file and then do the
: fixed width thing.
:
: Thanks
: Steve
 
And if all thsse don't work,try selecting the column and
then just doing a data/text to column/fixed with and get
rid of last 2 digits into seperate column and then delete
them.

Cheers
Lou
 
Back
Top