+ Reply to Thread
Results 1 to 6 of 6

Left() and Right() Formula in one cell

  1. #1
    Registered User
    Join Date
    07-31-2015
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    18

    Left() and Right() Formula in one cell

    I'm stuck on the correct syntax and keep getting an error. I have a text string that I want to pull a specific measurement out of.

    Example of data:

    POR 12X24 AAA BBB
    QWE 12x24 AAAAA BBBBBBBBBB
    DEF 4X24 AAAF GGGGG
    ABC 6X6 GG KKKK

    I am able to do this in two separate cells but want to have it combined into one.

    My Left Formula
    Please Login or Register  to view this content.
    My Right Formula
    Please Login or Register  to view this content.
    If there is a better approach please let me know.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Left() and Right() Formula in one cell

    Here:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Left() and Right() Formula in one cell

    Another approach:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Left() and Right() Formula in one cell

    Maybe this...

    Data Range
    A
    B
    1
    POR 12X24 AAA BBB
    12X24
    2
    QWE 12x24 AAAAA BBBBBBBBBB
    12x24
    3
    DEF 4X24 AAAF GGGGG
    4X24
    4
    ABC 6X6 GG KKKK
    6X6


    This formula entered in B1 and copied down:

    =TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",100)),100,100))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    07-31-2015
    Location
    Georgia
    MS-Off Ver
    2013
    Posts
    18

    Re: Left() and Right() Formula in one cell

    Much appreciated. Never used the Trim before but will do some research to see how I can incorporate it into other projects.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Left() and Right() Formula in one cell

    TRIM is here just to remove all spaces from text (except for single spaces between words).

+ 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] formula to reference cell on the left and add +1
    By kris_ in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-04-2015, 12:54 PM
  2. Is there a formula that will extract the numbers to the left of the cell
    By benji1973 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-04-2015, 10:11 AM
  3. Find cell with value from a column and insert formula in the cell to its left
    By konata in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2014, 05:11 AM
  4. [SOLVED] Formula to add a value to a cell, based on cell to the left's color
    By hellinabucket in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-11-2013, 01:55 AM
  5. [SOLVED] Need to paste formula into a cell if cell to the left contains text...possible?
    By fredderf81 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2013, 04:15 PM
  6. [SOLVED] Formula for cell=exact(left...&2)
    By nastech in forum Excel General
    Replies: 6
    Last Post: 06-10-2006, 07:00 AM
  7. LEFT &RIGHT formula on the same cell
    By Bonnie W. in forum Excel General
    Replies: 5
    Last Post: 02-09-2006, 12:35 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