ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   No Dashes, please? (https://www.excelbanter.com/excel-programming/299286-no-dashes-please.html)

Patrick[_5_]

No Dashes, please?
 
how do i use the value of a cell without the dashes?

For example

range(A1) = "123456-4434"

i want to use that number in an equasion as "1234564434"

thanks

JE McGimpsey

No Dashes, please?
 
One way:

=SUBSTITUTE(A1,"-","")+1

In article ,
"Patrick" wrote:

how do i use the value of a cell without the dashes?

For example

range(A1) = "123456-4434"

i want to use that number in an equasion as "1234564434"

thanks


Frank Kabel

No Dashes, please?
 
Hi
try
ret_var=CDbl(Replace(range("A1").value,"-",""))

--
Regards
Frank Kabel
Frankfurt, Germany


Patrick wrote:
how do i use the value of a cell without the dashes?

For example

range(A1) = "123456-4434"

i want to use that number in an equasion as "1234564434"

thanks


Bob Phillips[_6_]

No Dashes, please?
 
=SUBSTITUTE(A1,"-","")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Patrick" wrote in message
...
how do i use the value of a cell without the dashes?

For example

range(A1) = "123456-4434"

i want to use that number in an equasion as "1234564434"

thanks





All times are GMT +1. The time now is 05:01 AM.

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