LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Remove Alpha from AlphaNumeric String...

I'd like to see how to remove the alpha character from a cell, and
paste the contents to the cell next to it.
i.e. 430A, changes to 430, so I can strip just the number out of there.

Yesterday I was helped out with finding and alpha, how would I strip just
the numbers out of a text cell. As the numbers and letters are all consider a
text type in this case, in Excel.

Here's my code I used for my last instance. It worked great.

Sub Macro()
Dim Row_Count As Integer
Dim lastrow As Integer
lastrow = (ActiveWorkbook.Sheets(2).Cells(65536, 1).End(xlUp).Row) - 1
Row_Count = "2"

Do Until Row_Count = lastrow
If Right(Trim(Cells(Row_Count, 1)), 1) Like "[A-Za-z]" Then
Cells(Row_Count, 2).Value = "Alpha"
End If
Row_Count = Row_Count + 1
Loop

Sample Data that I'll be running my macro on:
430A
430A
430B
430B
V-57
V-58
V-59
V-60
V-61
V-62

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Numbers from Alphanumeric String Dave Excel Discussion (Misc queries) 27 December 25th 16 02:33 AM
HOW DO YOU COUNT ALPHA CHARACTERS IN AN ALPHANUMERIC FIELD PVSPRO Excel Discussion (Misc queries) 4 August 31st 07 12:04 AM
How do I replace last numeric string from a alphanumeric string? Christy Excel Discussion (Misc queries) 3 August 11th 06 12:17 AM
Find largest alphanumeric value matching alpha criteria in databas Alison Excel Worksheet Functions 7 August 4th 05 06:59 PM
Strip Alpha Characters out of an Alphanumeric Dataset supersonicf111 Excel Programming 22 January 2nd 04 11:57 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"