+ Reply to Thread
Results 1 to 2 of 2

Formula needed for find and replace multiple lines

  1. #1
    Registered User
    Join Date
    04-29-2010
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2008
    Posts
    1

    Formula needed for find and replace multiple lines

    Hi

    I'm on a Mac with Excel 2008
    I have a contact list with 6000 rows, I need to alter the data in two columns - 'contact name' and 'position' where there is more than one line of data in a cell.

    For example...

    If ROW 1, COLUMN A contains the following:
    Mr Smith
    Mrs Smith

    and ROW 1, COLUMN B contains
    Director
    Sales Manager

    I would like to delete Mrs Smith and Sales Manager. I'm hoping there is a formula that can find all cells with a return or multiple lines and delete the second line?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formula needed for find and replace multiple lines

    Using Edit -> Replace

    Highlight the data, run Edit -> Replace
    With Find What dialog active hold ALT and type 0010 with the numeric keypad (on laptop hold ALT + FN and type 0010 on numeric keypad [letters]) followed by *
    Leave Replace With dialog empty and press Replace All

    Using Formulae (if preferred)

    C1: =LEFT(A1,FIND(CHAR(10),A1&CHAR(10))-1)
    copied to D1

    C1:D1 copied down as far as required - copy results over originals (values only) and remove C:D

    (you have no VBA support in XL2008 so the above are you best options)

+ 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