Question for Excel users

Dudd

Platinum Member
Aug 3, 2001
2,865
0
0
I have a column full of numbers that have some other characters after them. For example,

2000-HYT
2001-HYT
etc.

Is there any way in Excel to delete the final 4 characters from every entry in the column without having to do each one individually? It is very tedious to delete those things several hundred times in a row. Thanks.
 

Dudd

Platinum Member
Aug 3, 2001
2,865
0
0
Originally posted by: minendo
Edit ---> Replace

Doh, don't even know why I didn't think of that. And to werk, I don't care. 99% of the crap in OT is pointless, and here I got an answer in seconds. In Software, it might have taken hours, if anyone even replyed. So,
rolleye.gif
.
 

Dudd

Platinum Member
Aug 3, 2001
2,865
0
0
Originally posted by: Izzo
Macros are useful when making repetitive keystokes.

I'm copy and pasting stuff from a webpage into an Excel document. I'm not actually typing anything, just copy-paste, copy paste.
 

Izzo

Senior member
May 30, 2003
714
0
0
I would use a macro to delete the 4 characters after every entry in Excel though. How would you use the Replace function in Excel to delete the last 4 characters? What if the stuff you want to keep or delete is not the same?

edit: added "or delete"
 

Shortcut

Golden Member
Jul 24, 2003
1,107
0
0
Originally posted by: Dudd
I have a column full of numbers that have some other characters after them. For example,

2000-HYT
2001-HYT
etc.

Is there any way in Excel to delete the final 4 characters from every entry in the column without having to do each one individually? It is very tedious to delete those things several hundred times in a row. Thanks.


here we go: Assuming cell A1 contains "2000-HYT":

1. insert a empty column to the right of column 1
2. in cell b1, type in the formula "=left(a1,4)"
3. copy b1 down the column to revise the rest of your dataset

 

CPA

Elite Member
Nov 19, 2001
30,322
4
0
Originally posted by: Shortcut
Originally posted by: Dudd
I have a column full of numbers that have some other characters after them. For example,

2000-HYT
2001-HYT
etc.

Is there any way in Excel to delete the final 4 characters from every entry in the column without having to do each one individually? It is very tedious to delete those things several hundred times in a row. Thanks.


here we go: Assuming cell A1 contains "2000-HYT":

1. insert a empty column to the right of column 1
2. in cell b1, type in the formula "=left(a1,4)"
3. copy b1 down the column to revise the rest of your dataset


this is the best way.