+ Reply to Thread
Results 1 to 6 of 6

Remove space hyphen space and move data to right to new col

  1. #1
    Forum Contributor
    Join Date
    08-15-2006
    Location
    USA
    MS-Off Ver
    Office 365, 64 bit
    Posts
    362

    Remove space hyphen space and move data to right to new col

    In the attached file, column A has ####[space]-[space]description...

    I need the #### to remain in column A and the description to be moved to column B and the rest ([space]-[space]) to be removed... I have thousands of rows. I only provided a sample.

    Note: in the event that a cell in a any row doesn't start with ####, skip/ignore instead of erroring out. Maybe highlight in red to address them separately.

    Thx
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Remove space hyphen space and move data to right to new col

    Hi rz6657,

    Something like this?
    Please Login or Register  to view this content.
    Last edited by Arkadi; 04-20-2020 at 01:12 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Remove space hyphen space and move data to right to new col

    If you have thousands of rows then use a Macro

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 04-20-2020 at 01:24 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Remove space hyphen space and move data to right to new col

    If I am not mistaken, I believe this macro will also work...
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this demonstration !


    According to the attachment as a VBA beginner starter :

    PHP Code: 
    Sub Demo1()
             
    Columns(2).Insert
        With 
    [A1].CurrentRegion
            
    .Replace " - "vbTabxlPart
            
    .TextToColumns xlDelimited, , , True, , , , False
        End With
             
    [B1] = "App"
    End Sub 
    ► Do you like it ? ► ► So thanks to click on bottom left star icon « Add Reputation » ! ◄ ◄
    Last edited by Marc L; 04-20-2020 at 01:39 PM.

  6. #6
    Forum Contributor
    Join Date
    08-15-2006
    Location
    USA
    MS-Off Ver
    Office 365, 64 bit
    Posts
    362

    Re: Remove space hyphen space and move data to right to new col

    Thx to everyone with a quick fix. This is resolved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula to get rid of a space after a Hyphen is located in a cell
    By webuxer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2019, 11:54 AM
  2. Remove from over 2 blank space to 1 space.
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-12-2018, 08:27 PM
  3. [SOLVED] Formula To Remove Hyphen But Keep Space
    By jo15765 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2017, 08:55 PM
  4. Dash or Hyphen Automatically Adds Space in VBA code
    By noodle88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2014, 11:46 PM
  5. [SOLVED] How to remove empty space, unable to make pvot, because pvot calculate empty space
    By vengatvj in forum Excel Charting & Pivots
    Replies: 20
    Last Post: 10-29-2013, 12:43 PM
  6. [SOLVED] Macro / VBA to replace space between numbers with a hyphen
    By chicolocal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2013, 03:59 PM
  7. [SOLVED] If Cell Starts with a Space, remove that space
    By Ocean Zhang in forum Excel General
    Replies: 2
    Last Post: 09-29-2012, 01:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1