Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Remove all hyphens from a cell

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove all hyphens from a cell

    First post, interesting Title requirements you have here

    I am trying to take a list of part numbers that have an undefined number of hyphens in the part number, and remove the hyphens in order to use the VLOOKUP function.

    Example part numbers are AA34-55A3-L, 444342-02, etc.

    I tried searching for threads that helped on this subject but they all involved VBA, which I do not know how to use with Excel. I took VB senior year of high school and C for a semester in college, so I recognize the commands, but I have no idea how it's implemented.

    Is there a [relatively simple] way to do this with Excel functions? If not, how would I implement this using VBA? I am currently using the 2003 edition.

    Thanks!

    B

  • #2
    Re: Remove all hyphens from a cell

    First just try just selecting the whole sheet and do a find/replace on "-" with "".

    If you really want the macro, just record the steps. It's such a simple manual process it really doesn't warrant a macro... unless it's an embedded step in a larger macro.
    Sub All_Macros(Optional control As Variant)

    Comment


    • #3
      Re: Remove all hyphens from a cell

      Or, use

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

      Comment


      • #4
        Re: Remove all hyphens from a cell

        Thanks for the help, I got it!

        Comment

        Trending

        Collapse

        There are no results that meet this criteria.

        Working...
        X