Substitute Alphanumeric Values

martinmc

New Member
Joined
Apr 21, 2019
Messages
16
Hi, Is there any other alternative or shorter solution for rewriting the below formula example.i have read in an older post that the SUBSTITUTE function cannot handle the "old_text" part as an array{1,2,3,4,5,6,7,8,9,0}
Thanks In Advance.

A1B2C3D4E5F6G7H8J9K0
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( SUBSTITUTE( SUBSTITUTE(SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE(A1,0,""),1,""), 2,""),3,""),4,""), 5,""),6,""),7,""),8,""),9,"")
Result In B1
ABCDEFGHJK

<tbody>
</tbody>

<tbody>
</tbody>
 
And here is a non-looping one-liner UDF...
Code:
[table="width: 500"]
[tr]
	[td]Function TextOnly(ByVal S As String) As Variant
  TextOnly = Replace(Join(Evaluate("TRANSPOSE(IF(ISNUMBER(-MID(A1,ROW(1:" & Len(S) & "),1)),"""",MID(A1,ROW(1:" & Len(S) & "),1)))")), " ", "")
End Function[/td]
[/tr]
[/table]
 
Last edited:
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Thank You Sandy666, PowerQuery is all new to me at the moment and i will definitely give this a try out. :)
 
Upvote 0
i am currently using Microsoft Office Home and Business 2013, Office 365 will be my next investment very soon.:)

Excel 2013 doesn't contain PowerQuery. Especially Excel H&B, so you really need higher version.
 
Upvote 0
Thanks all again for your time and replies, i am very new to this forum and i have heard a while back that there are very clever Excel people on this site and i have to say they are 100% correct so far.:)
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top