ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there a way to short this substitute formula? (https://www.excelbanter.com/excel-discussion-misc-queries/188217-there-way-short-substitute-formula.html)

Brad

Is there a way to short this substitute formula?
 
I want to remove all periods, hyphens and comma's. The below works but is
there a better solution?

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(K35,".","")," ",""),"-","")


--
Wag more, bark less

T. Valko

Is there a way to short this substitute formula?
 
is there a better solution?

From a formula, not really. The old_text argument can't be an array. That's
why you have to nest a new level for every different old_text argument.


--
Biff
Microsoft Excel MVP


"Brad" wrote in message
...
I want to remove all periods, hyphens and comma's. The below works but is
there a better solution?

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(K35,".","")," ",""),"-","")


--
Wag more, bark less




Brad

Is there a way to short this substitute formula?
 
Thanks.
--
Wag more, bark less


"T. Valko" wrote:

is there a better solution?


From a formula, not really. The old_text argument can't be an array. That's
why you have to nest a new level for every different old_text argument.


--
Biff
Microsoft Excel MVP


"Brad" wrote in message
...
I want to remove all periods, hyphens and comma's. The below works but is
there a better solution?

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(K35,".","")," ",""),"-","")


--
Wag more, bark less





T. Valko

Is there a way to short this substitute formula?
 
You're welcome!

--
Biff
Microsoft Excel MVP


"Brad" wrote in message
...
Thanks.
--
Wag more, bark less


"T. Valko" wrote:

is there a better solution?


From a formula, not really. The old_text argument can't be an array.
That's
why you have to nest a new level for every different old_text argument.


--
Biff
Microsoft Excel MVP


"Brad" wrote in message
...
I want to remove all periods, hyphens and comma's. The below works but
is
there a better solution?

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(K35,".","")," ",""),"-","")


--
Wag more, bark less








All times are GMT +1. The time now is 10:43 PM.

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