+ Reply to Thread
Results 1 to 4 of 4

If cell "contains" text, insert word into another cell ?

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Maui
    MS-Off Ver
    2011
    Posts
    3

    If cell "contains" text, insert word into another cell ?

    Hi guys, I'm hoping someone can help with the following excel problem - or at least tell me it's not possible!

    I have a database of customers and company names which I'm trying to sort through and arrange for a marketing campaign.

    Presently, as the database comes to me, their naming details are all contained in column "A" separated with comma's- for example:

    JONES,TONY
    BROWN,JOE S
    COMPANY,THE INDUSTRIAL COMPUTING
    SHOP,THE OUTSIZE
    TRUST,TWO TREES
    WILLIAMS,MARK T R & JOHN W

    Etc.

    I need to have the customers "first name" in column "A" and "last name" in column "B". If the name is not a person (ie: a Trust or a company), I need it to simply insert "Sir or Madam" in Column "A" and leave column "B" blank.

    A lot to ask I know, but I have several thousand entries and it'll take me days to go through each one to do this manually.

    Any help would be appreciated.

    Thankyou.

  2. #2
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: If cell "contains" text, insert word into another cell ?

    Not an easy one troy728. Messy. Start with text to columns, comma and space delimiters. The obvious ones will take up 2 cells and not require attention. Hopefully, depending on your data, you've knocked out quite a few. The rest look as though some heavy lifting is required. Use your filter to display those records with more than 3 columns, create helper columns to add "Sir or Madam" to a cell presumably in column A.

    Good luck.

    Pete

  3. #3
    Registered User
    Join Date
    08-17-2015
    Location
    Maui
    MS-Off Ver
    2011
    Posts
    3

    Re: If cell "contains" text, insert word into another cell ?

    HI Pete, so still quite a lot of manual work required eh? I guessed as much. I managed to get the text to columns filtering done, but there's still a heck of a lot of companies, Trusts etc in the filtering results. I'd hoped to use a formula which said "if the word "Trust" or "Company" or "Inc" appears in cell A6 (for example) then insert the words "Sir/Madam" in cell H6 ???

    I guess that's probably beyond the ability of Excel ???

    Thanks for your comments. Appreciate the response

  4. #4
    Registered User
    Join Date
    08-17-2015
    Location
    Maui
    MS-Off Ver
    2011
    Posts
    3

    Re: If cell "contains" text, insert word into another cell ?

    Hi, just for anyone who might be interested in the method I used:- Mainly using the "Conditional Formatting" in Excels toolbar.

    • First I used "Text to Columns" to separate the names within column A (this provided me with another 5 horizontal cells from B-F with LastName, FirstName, Text_1, Text_2, & Text_3 - or whatever text/initials/letters were left over after the name etc).
    • I then created a filter using Conditional formatting, which identified text ("TRUST") in any cell and gave it a coloured background.
    • I replicated the Conditional formatting for every word I wanted to identify (COMPANY, INC, LLC), ending up with 4 Conditional Formatting entries.
    • Next I sorted the sheet by "cell colour" of column A
    • This put all the entries I needed to edit, together, and I simply copied the words "Sir/Madam" from the very topmost entry, downwards until I reached the end of the entries I needed to change.

    At first I suspected it would be a long task, but after I created the filtering it took me less than 2 hours in total.

    Hope this may be of use to someone else in the future.


+ 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] If cell empty, populate with word "Insert"
    By SharpL in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2014, 07:21 AM
  2. Replies: 12
    Last Post: 06-12-2014, 02:11 PM
  3. [SOLVED] Formula Needed to fill multiple cells with "No" when the word "No" is entered into a cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2013, 05:36 PM
  4. VBA to insert pictures to " insert comment " or "Text box" in cell E5 and E15
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2013, 08:10 PM
  5. "if cell contains text Insert row below" coding works the opposite
    By momad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2012, 11:20 PM
  6. Move text (the word "The") to beginning of cell
    By techstorm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2012, 03:04 PM
  7. Replies: 2
    Last Post: 08-02-2011, 06:57 AM

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