DRSteele

Remove Unwanted Characters from a Textstring

DRSteele

Well-known Member
Joined
Mar 31, 2015
Messages
2,667
Office Version
  1. 365
Platform
  1. Windows
DRSteele submitted a new Excel article:

Remove Unwanted Characters from a Textstring - We can get rid of things like punctuation from a textstring in a cell.


Read more about this Excel article...
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi Don
I would just suggest instead of using TEXTJOIN & specifying a null joiner, swap to CONCAT instead.
Excel Formula:
=CONCAT(IFNA(UNICHAR(XLOOKUP(UNICODE(MID(C1,SEQUENCE(LEN(C1)),1)),T_codes[Permitted UNICODE],T_codes[Permitted UNICODE])),""))
 
Actually, if you are making a list of allowed characters, do you need their codes as well?

22 09 24.xlsm
BC
1text string:gfpak(&LR--Ysdf/fhV+125,Ufd*^@3+
2reduced text string:gfpakLRYsdffhV125Ufd3
3
4
5Characters
60
71
82
93
104
115
126
137
148
15A
16B
17C
18D
19E
20F
21G
22H
23I
24J
25K
26L
27M
28N
29O
30P
31Q
32R
33S
34T
35U
36V
37W
38X
39Y
40a
41b
42c
43d
44e
45f
46g
47h
48i
49j
50k
51l
52m
53n
54o
55p
56q
57r
58s
59t
60u
61v
62w
63x
64y
65
Sheet3
Cell Formulas
RangeFormula
C2C2=LET(t,MID(C1,SEQUENCE(LEN(C1)),1),CONCAT(IF(ISNUMBER(FIND(t,CONCAT(Allowed[Characters]))),t,"")))
 
All very good observations as usual, Peter. Thanks tons!
 

Forum statistics

Threads
1,226,453
Messages
6,191,135
Members
453,642
Latest member
jefals

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