+ Reply to Thread
Results 1 to 11 of 11

Formula to move part of a value to a new cell

  1. #1
    Forum Contributor
    Join Date
    10-10-2015
    Location
    nj
    MS-Off Ver
    Office 2021
    Posts
    203

    Formula to move part of a value to a new cell

    Hi guys,

    Have this value in cell a1 "zxxxxxx-size-6_8070_10921_e5578cbb1315a1". I would like to move it to b1 automatically to look like "zxxxxxx-size".

    Does anyone have a formula for that?

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Formula to move part of a value to a new cell

    Try,

    B1: =LEFT(A1,FIND("size",A1)+3)

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Formula to move part of a value to a new cell

    if the format is always like that...blahblah-blahblah-somemorestuff then try this...
    =LEFT(A1,FIND("@",SUBSTITUTE(A1,"-","@",2))-1)

    If the format is not always that way, please provide some more samples
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    10-10-2015
    Location
    nj
    MS-Off Ver
    Office 2021
    Posts
    203

    Re: Formula to move part of a value to a new cell

    I should clarify. The only word that is always in the cell is "-size". Everything before "-size" needs to be moved to the new cell (along with -size"). Everything after it can be deleted.

  5. #5
    Forum Contributor
    Join Date
    10-10-2015
    Location
    nj
    MS-Off Ver
    Office 2021
    Posts
    203

    Re: Formula to move part of a value to a new cell

    Hi please see attached for examples.
    Attached Files Attached Files

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Formula to move part of a value to a new cell

    then berlan's formula should work for you. Did you try the suggestions yet?
    They both work on your sample data

  7. #7
    Forum Contributor
    Join Date
    10-10-2015
    Location
    nj
    MS-Off Ver
    Office 2021
    Posts
    203

    Re: Formula to move part of a value to a new cell

    Hi, yes Berlans formula worked except..

    I need to take it a little further... See the attached.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-10-2015
    Location
    nj
    MS-Off Ver
    Office 2021
    Posts
    203

    Re: Formula to move part of a value to a new cell

    bump, have I stumped?

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to move part of a value to a new cell

    Try

    =LEFT(A1,FIND("_",A1)-1)

  10. #10
    Forum Contributor
    Join Date
    10-10-2015
    Location
    nj
    MS-Off Ver
    Office 2021
    Posts
    203

    Re: Formula to move part of a value to a new cell

    Quote Originally Posted by Jonmo1 View Post
    Try

    =LEFT(A1,FIND("_",A1)-1)
    Bingo!

    So _ is the point at which everything deletes in the formula eh? What if I had two "_"?

    Just curious, trying to learn.

    Thanks!

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula to move part of a value to a new cell

    The values in that book DO have 2 _

    It's just returning the text up to the 1st one.

+ 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] Move part of row to 2nd row, another part of row to 3rd row
    By buggseyosu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2014, 09:29 PM
  2. move part of cell data
    By vermicelli in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-30-2007, 04:48 PM
  3. Move a part of a cell to another cell
    By sura in forum Excel General
    Replies: 3
    Last Post: 04-09-2007, 08:32 PM
  4. Replies: 1
    Last Post: 07-20-2006, 03:05 PM
  5. [SOLVED] move part of a cell content
    By slowhand in forum Excel General
    Replies: 2
    Last Post: 04-14-2006, 11:20 AM
  6. Move Part of Cell String
    By tom in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-13-2005, 02:05 PM
  7. move part of cell to new column
    By S.E. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-03-2005, 12:06 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