+ Reply to Thread
Results 1 to 5 of 5

Adding |Pipe| to values in cells

Hybrid View

alholle2 Adding |Pipe| to values in... 10-15-2014, 11:27 AM
Marc L Re: Adding |Pipe| to values... 10-15-2014, 02:13 PM
alholle2 Re: Adding |Pipe| to values... 10-20-2014, 11:30 AM
alholle2 Re: Adding |Pipe| to values... 10-20-2014, 11:29 AM
JOHN H. DAVIS Re: Adding |Pipe| to values... 10-20-2014, 11:43 AM
  1. #1
    Registered User
    Join Date
    10-15-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    9

    Adding |Pipe| to values in cells

    I have a similar situation.

    I have a single cell that looks something like this:
    2007 Dodge Ram
    2008 Dodge Ram
    2010-2012 Dodge Ram

    I would need to keep all of that data in one cell and make it look like this:
    2007|Dodge|Ram
    2008|Dodge|Ram
    2010-2012|Dodge|Ram

    Is this possible?

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

    Re: Adding |Pipe| to values in cells


    See Replace method …

  3. #3
    Registered User
    Join Date
    10-15-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    9

    Re: Adding |Pipe| to values in cells

    Sorry need to add that the year make and model info all needs to be in one cell.

  4. #4
    Registered User
    Join Date
    10-15-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    9

    Re: Adding |Pipe| to values in cells

    I have another issue with this. My data has a SKU column. That is the first column in the following example:
    111 2007 Dodge Ram
    111 2008 Dodge Ram
    111 2010-2012 Dodge Ram
    112 2007 Dodge Ram
    112 2008 Dodge Ram
    112 2010-2012 Dodge Ram

    I would actually need the output to look like this:
    111 2007|Dodge|Ram
    2008|Dodge|Ram
    2010-2012|Dodge|Ram
    112 2007|Dodge|Ram
    2008|Dodge|Ram
    2010-2012|Dodge|Ram

    I would need to put all of the data in the right format into one cell associated with the same SKU. Does this make sense?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Adding |Pipe| to values in cells

    Maybe:

    Sub alholle2()
    Dim rcell As Range
    For Each rcell In Range("A2:A" & Range("A" & Rows.Count).End(3).Row)
        rcell.Offset(, 1).Value = Right(rcell, Len(rcell) - 4)
        rcell.Value = Left(rcell, 4)
        rcell.Offset(, 1).Replace " ", "|", xlPart
    Next rcell
    End Sub
    Assumes Column A is your SKU Column

+ 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. [SOLVED] Adding |Pipe| to values in cells
    By talan in forum Excel General
    Replies: 26
    Last Post: 06-25-2015, 11:23 AM
  2. [SOLVED] Count all the unique values in a cell separated by a pipe delimiter, i.e. |
    By Lija in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2013, 11:16 AM
  3. CSV file with two columns multiple values separated by pipe. Need to Combine
    By nikythebest in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-01-2012, 04:30 AM
  4. Pipe delimited adding spaces for numeric columns
    By dntel123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2011, 06:57 AM
  5. Adding values in cells (stops adding after row 14)
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-02-2009, 09:43 AM

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