Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Mr Happy
 
Posts: n/a
Default remove a dash from part numbers

I have a database that have part number with dashes (ex. AX-2912) is there
a way to remove the dash?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default remove a dash from part numbers

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default remove a dash from part numbers

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 wrote in message
...
I have a database that have part number with dashes (ex.
AX-2912) is there
a way to remove the dash?



  #4   Report Post  
Posted to microsoft.public.excel.misc
Mr Happy
 
Posts: n/a
Default remove a dash from part numbers

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM
Vlookup referencing one column that contains part numbers in both. crafty_girl Excel Worksheet Functions 2 April 18th 06 07:29 PM
Limit drop down list and linking to other info Intuit Excel Worksheet Functions 13 February 2nd 06 09:48 PM
Counting Unique Part Numbers In A Range BigH Excel Worksheet Functions 2 December 9th 05 07:09 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM


All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"