I have a database that have part number with dashes (ex. AX-2912) is there
a way to remove the dash?
I have a database that have part number with dashes (ex. AX-2912) is there
a way to remove the dash?
You could use Find/Replace. Find - and leave the Replace With field blank.
Or, you could set up a formula in an adjacent column.
=SUBSTITUTE(A1,"-","")
HTH,
Elkar
"Mr Happy" wrote:
> I have a database that have part number with dashes (ex. AX-2912) is there
> a way to remove the dash?
You can do it with a formula:
=SUBSTITUTE(A1,"-","")
If you need VBA code to loop through an entire range, use
Sub AAA()
Dim Rng As Range
For Each Rng In Selection.Cells
Rng.Value = Replace(Rng.Text, "-", "")
Next Rng
End Sub
Select the cells with the dashes and then run the code.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Mr Happy" <Mr [email protected]> wrote in message
news:[email protected]...
>I have a database that have part number with dashes (ex.
>AX-2912) is there
> a way to remove the dash?
Thank you both.
"Elkar" wrote:
> You could use Find/Replace. Find - and leave the Replace With field blank.
>
> Or, you could set up a formula in an adjacent column.
>
> =SUBSTITUTE(A1,"-","")
>
> HTH,
> Elkar
>
>
> "Mr Happy" wrote:
>
> > I have a database that have part number with dashes (ex. AX-2912) is there
> > a way to remove the dash?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks