+ Reply to Thread
Results 1 to 3 of 3

Copy Names from Column A to Column B If Those Names Are Found In A List Of Names

  1. #1
    Registered User
    Join Date
    04-30-2014
    Location
    Bucharest
    MS-Off Ver
    Excel 2010
    Posts
    1

    Copy Names from Column A to Column B If Those Names Are Found In A List Of Names

    Hi friends,
    I found no way to recognize somehow that a specific cell from column A (~25.000 records) have at least one name from column D (~390 names).
    Preferably I would want to copy it in B column, but at least to fill the cell with a color or place in the next column a "YES or NOT" correctly.

    I tried many formulas and they seem to be correct:
    When I use some formulas in a new table where i write down some texts in A and D, it works.
    But when I copy and paste my records to the same places, again it stop working...
    namelist.xlsx
    Thank you in advance if you can solve my last 12 hours problem!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,879

    Re: Copy Names from Column A to Column B If Those Names Are Found In A List Of Names

    The data in E ( and F) has an extra character on the end. Remove this and use


    =COUNTIF($A$2:$A$3000,F2)

    to give count on matches

    I changed F using =LEFT(E2,len(E2)-1)

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Copy Names from Column A to Column B If Those Names Are Found In A List Of Names

    It would be pretty simple to run it off IF(COUNTIF>0) except that you're looking for words in side a text string, and it's not an exact match because the "DATABASE" range has an extra space on the end and the "NAME" range don't.

    I was looking at maybe doing an arrayed formula like {SUM(SEARCH)>0} to replace the COUNTIF, but then I ran into the problem that you would find the string "Ada" inside the string "Adalbert" and that would be that.

    I think you'd be better off doing some pre-processing, if possible:
    1) Excise the training spaces from the DATABASE column by running CTRL+H and replacing all the empty spaces " " with a null string ""; all you have to do is put a blank space in the FIND box and leave the REPLACE box empty.

    2) Use the "Text To Columns" command (Data ribbon; leftmost button in the Data Tools group) and split out the NAME fields in A:A so that you've got first names in column A, second names in column B, third names in column C, etc.

    Then you can run something like IF(COUNTIF(database, name1) + COUNTIF(database, name2) + COUNTIF(database, name3) > 0) to do your test.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

+ 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. Extract column names by searching Row 1 header names?
    By Syfy in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-04-2015, 07:27 PM
  2. [SOLVED] Return column names/field names from one table
    By mc84excel in forum Access Tables & Databases
    Replies: 11
    Last Post: 04-08-2015, 12:01 AM
  3. Replies: 21
    Last Post: 08-18-2014, 06:44 PM
  4. Show query column names behind pivot table field names
    By gbritton in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-18-2013, 03:17 PM
  5. Excel Names in column to text files names to folder
    By excelaron in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 07:22 PM
  6. Replies: 3
    Last Post: 11-08-2012, 09:29 PM
  7. Replies: 5
    Last Post: 01-13-2012, 03:20 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