+ Reply to Thread
Results 1 to 5 of 5

need to add [brackets] to numbers in a cell that contain text and numebrs

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    2

    need to add [brackets] to numbers in a cell that contain text and numebrs

    I have a cell that has text followed by numbers. Ex: Bob 1234

    I need to add [brackets] to only the numbers. What formula can I write to do this?

    Thanks!

  2. #2
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: need to add [brackets] to numbers in a cell that contain text and numebrs

    Separate the Name and the numbers in 2 separate columns using Data tab --> Text to Columns --> Delimited --> Specae option and then apply the following formula in an adjacent column

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    where M & N represents your separated values (e.g. M contains Bob and N contains the numbers
    Liked the answer given? click * to say so

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: need to add [brackets] to numbers in a cell that contain text and numebrs

    thank you. I forgot about separating the text from numbers!!!

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: need to add [brackets] to numbers in a cell that contain text and numebrs

    Assuming Bob 1234 is in cell A1

    in B1

    copy and paste

    =TRIM(LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1))

    in C1

    See post below.
    Last edited by AlKey; 11-21-2013 at 02:48 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: need to add [brackets] to numbers in a cell that contain text and numebrs

    Actually for C1 this would be better

    ="["&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),25)&"]"

+ 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: 13
    Last Post: 08-28-2014, 08:00 PM
  2. Sorting numbers which contain text and brackets
    By ramonjr17 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-08-2013, 08:03 PM
  3. Replies: 8
    Last Post: 04-22-2013, 04:37 AM
  4. Placing brackets around numbers in one cell when another cell changes
    By cjwanat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2010, 11:10 AM
  5. [SOLVED] Custom format a text cell with square brackets: [ ] ?
    By StargateFan in forum Excel General
    Replies: 2
    Last Post: 02-06-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