![]() |
Removing an alpha characture from a column of numbers
I have a column of numbers that end with an alpha character. I need to
remove the alpha character and I'd like to write a macro or formula to do it automatically since the column is about 1000 numbers long. I got the macro to work once, but it won't work again on the balance of the column. Would someone please help me figure out what I need to do to make this an automatic process so I can reuse it at a later date? Thanks so much! |
Removing an alpha characture from a column of numbers
=--LEFT(A1,LEN(A1)-1) and copy down
-- Gary''s Student - gsnu200802 |
Removing an alpha characture from a column of numbers
Hi,
You can have a macri if you want but put this in an adjacent column and double clivk the fill handle and it will fill down as far as there are data in an adjacent column and remove the last character. =LEFT(A1,LEN(A1)-1)+0 Mike "K Drier" wrote: I have a column of numbers that end with an alpha character. I need to remove the alpha character and I'd like to write a macro or formula to do it automatically since the column is about 1000 numbers long. I got the macro to work once, but it won't work again on the balance of the column. Would someone please help me figure out what I need to do to make this an automatic process so I can reuse it at a later date? Thanks so much! |
Removing an alpha characture from a column of numbers
=LEFT(A1,LEN(A1)-1)
-- David Biddulph "K Drier" <K wrote in message ... I have a column of numbers that end with an alpha character. I need to remove the alpha character and I'd like to write a macro or formula to do it automatically since the column is about 1000 numbers long. I got the macro to work once, but it won't work again on the balance of the column. Would someone please help me figure out what I need to do to make this an automatic process so I can reuse it at a later date? Thanks so much! |
Removing an alpha characture from a column of numbers
Dim LastRow As Long
Dim i As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 2 To LastRow .Cells(i, "A").Value = Val(Left$(.Cells(i, "A").Value, Len(.Cells(i, "A").Value) - 1)) Next i End With -- __________________________________ HTH Bob "K Drier" <K wrote in message ... I have a column of numbers that end with an alpha character. I need to remove the alpha character and I'd like to write a macro or formula to do it automatically since the column is about 1000 numbers long. I got the macro to work once, but it won't work again on the balance of the column. Would someone please help me figure out what I need to do to make this an automatic process so I can reuse it at a later date? Thanks so much! |
Removing an alpha characture from a column of numbers
This worked Perfectly!!! Thank you so much!
"Mike H" wrote: Hi, You can have a macri if you want but put this in an adjacent column and double clivk the fill handle and it will fill down as far as there are data in an adjacent column and remove the last character. =LEFT(A1,LEN(A1)-1)+0 Mike "K Drier" wrote: I have a column of numbers that end with an alpha character. I need to remove the alpha character and I'd like to write a macro or formula to do it automatically since the column is about 1000 numbers long. I got the macro to work once, but it won't work again on the balance of the column. Would someone please help me figure out what I need to do to make this an automatic process so I can reuse it at a later date? Thanks so much! |
Removing an alpha characture from a column of numbers
Given that the values being modified are numbers with any alpha characters
only at the end, you can shorten your code to this... Dim LastRow As Long Dim i As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 2 To LastRow .Cells(i, "A").Value = Val(.Cells(i, "A").Value) Next End With -- Rick (MVP - Excel) "Bob Phillips" wrote in message ... Dim LastRow As Long Dim i As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = 2 To LastRow .Cells(i, "A").Value = Val(Left$(.Cells(i, "A").Value, Len(.Cells(i, "A").Value) - 1)) Next i End With -- __________________________________ HTH Bob "K Drier" <K wrote in message ... I have a column of numbers that end with an alpha character. I need to remove the alpha character and I'd like to write a macro or formula to do it automatically since the column is about 1000 numbers long. I got the macro to work once, but it won't work again on the balance of the column. Would someone please help me figure out what I need to do to make this an automatic process so I can reuse it at a later date? Thanks so much! |
All times are GMT +1. The time now is 06:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com