+ Reply to Thread
Results 1 to 4 of 4

Deleting part of a cell

  1. #1
    Registered User
    Join Date
    09-14-2006
    Posts
    7

    Deleting part of a cell

    Hello all,

    I am working on a spreadsheet at work that needs formatting. In the city column are listed all the cities (surprising I know) but they also have the county in there. I cannot use text to columns or anything that simple as the county names are all different lengths. I need to delete the county names from these cells. I would normally do it manually but there are around 1000 instances that need resolving!

    Is there a formula that can do this for me? One that would delete the word on the righthand side of the cell would be ideal!

    Many thanks

    Rich
    Last edited by clarkerm; 12-12-2006 at 08:29 AM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    I'm assuming City, space, Country so something like this

    =MID(A1,FIND(" ",A1,1)+1,99)

    =LEFT(A1,FIND(" ",A1,1)-1)
    Last edited by oldchippy; 12-12-2006 at 08:35 AM.
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    09-14-2006
    Posts
    7
    Quote Originally Posted by oldchippy
    I'm assuming City, space, Country so something like this

    =MID(A1,FIND(" ",A1,1)+1,99)

    =LEFT(A1,FIND(" ",A1,1)-1)
    Close, I've got "630 Old Country Road Nassau" and need to just have "630 Old Country Road"

    The 1st formula leaves me with "Old Country Road Nassau" and the 2nd with "630".

    How can I refine this?

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this, but enter as an Array, Ctrl+Shift+Enter, in cell B1

    =RIGHT(A1,LEN(A1)-MAX(ROW(INDIRECT("1:"&LEN(A1))) *(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)=" ")))

    then in C1 enter this - standard formula

    =LEFT(A1,LEN(A1)-LEN(B1)-1)
    Last edited by oldchippy; 12-12-2006 at 09:21 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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