ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to removed the first three char and last char in XLS (https://www.excelbanter.com/excel-programming/319346-how-removed-first-three-char-last-char-xls.html)

lillian

How to removed the first three char and last char in XLS
 
I have one excel spreed sheet like 10001:F7110- first row, second row will
be like 10001:F7111-, third row will like 10001:F112-, how can I write
macro remove 10 and last - in this excel sheet.

Thanks.


Lillian


Dave Peterson[_5_]

How to removed the first three char and last char in XLS
 
One way is to use a helper column with a formula in it:

=MID(A1,4,LEN(A1)-4)

Starts in column 4 and takes all the characters (except the last and the first
3)

If they all start with 10 and finish with dashes (and those strings don't
appear in the portion to keep), you could do:

Edit|Replace
what: 10
with: (leave empty)
replace all

and
edit|replace
what: -
with: (leave empty)
replace all





Lillian wrote:

I have one excel spreed sheet like 10001:F7110- first row, second row will
be like 10001:F7111-, third row will like 10001:F112-, how can I write
macro remove 10 and last - in this excel sheet.

Thanks.

Lillian


--

Dave Peterson


All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com