+ Reply to Thread
Results 1 to 8 of 8

LEFT, MID, RIGHT formulas

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    20

    LEFT, MID, RIGHT formulas

    Dont quite understand them...

    How can I get this.... CPBL_CFRS_000001_B2

    ....from a cell that currently states CPBLCFRS000001B2.

    I have over 100 to edit and dont want to manually edit 1 by 1!

    Thanks
    Alun

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: LEFT, MID, RIGHT formulas

    How representative is the example you have shown? Is it always 4 characters, 4 characters, 6 digits and 2 characters?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    06-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: LEFT, MID, RIGHT formulas

    yes always that format

  4. #4
    Registered User
    Join Date
    06-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: LEFT, MID, RIGHT formulas

    But I need the underscore within each section _

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: LEFT, MID, RIGHT formulas

    Try this, then...

    =REPLACE(REPLACE(REPLACE(A1,5,0,"_"),10,0,"_"),17,0,"_")

    assuming data in A1

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,705

    Re: LEFT, MID, RIGHT formulas

    Try this:

    =LEFT(A1,4)&"_"&MID(A1,5,4)&"_"&MID(A1,9,6)&"_"&RIGHT(A1,2)

    assuming your text string is in A1.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    06-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: LEFT, MID, RIGHT formulas

    Perfect thanks Pete

  8. #8
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Pakistan
    MS-Off Ver
    2013, 2016
    Posts
    283

    Re: LEFT, MID, RIGHT formulas

    =LEFT(A1,4)&"_"&MID(A1,5,4)&"_"&MID(A1,9,6)&"_"&RIGHT(A1,2)

    This is perfect

+ 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. Replies: 2
    Last Post: 09-05-2014, 05:31 AM
  2. Trim and left formulas
    By Jack White in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2013, 09:25 PM
  3. [SOLVED] Can't sum column that contains =Left formulas and the results
    By dbogey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2013, 08:27 PM
  4. [SOLVED] Using LEFT and RIGHT and IF formulas....
    By controlfreak in forum Excel General
    Replies: 4
    Last Post: 06-19-2012, 07:35 AM
  5. Replies: 2
    Last Post: 03-05-2012, 06: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