+ Reply to Thread
Results 1 to 6 of 6

Finding names in a list of names

Hybrid View

  1. #1
    Registered User
    Join Date
    09-01-2007
    Location
    St Neots, UK
    Posts
    11

    Finding names in a list of names

    I have an excel spreadsheet with several clumns, two of them (say C and D) contain two or three names.

    Colums C and D may contains names such as

    Joe Smith
    Joe Smith & Fred Blogs
    Joe Smith and Fred Blogs
    Joe and Sue Bloggs
    Joe Smith, Fred Bloggs and Bill Brown

    As you can see there is no real set pattern to the data input.

    I would like to find all cells in (say) Column C containing (say) Joe Smith. I am using the excel the Excel" Find" forumla.

    In (say) D6 I enter "=FIND("Joe",C6,1)
    In (say) E6 I enter "=FIND("Smith",C6,1)

    So D6 holds either "#Value!" if "Joe" is not found and a "number" if it is.
    And E6 holds either "#Value!" if "Smith" is not found and a "number" if it is.

    If both D6 and E6 both contain a number "Joe Smith" has been found and I want F6 to hold (say) the number 1

    If either D6 or E6 contains "#Value!" then "Joe Smith" has not been found and I want F6 to be blank.

    How can I create the values needed in column F6?
    Last edited by djchapple; 09-05-2011 at 11:15 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: What forumula?

    Why not try..

    =FIND("Joe Smith",C6,1)
    Martin

  3. #3
    Forum Contributor yay_excel's Avatar
    Join Date
    08-12-2011
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    190

    Re: What forumula?

    In F6: =IF(AND(D6>0,E6>0),D6,"")

    This formula will return the number in D6 if both D6 and E6 contain numbers or nothing if they do not both contain numbers.

  4. #4
    Registered User
    Join Date
    09-01-2007
    Location
    St Neots, UK
    Posts
    11

    Re: What formula?

    Quote Originally Posted by yay_excel View Post
    In F6: =IF(AND(D6>0,E6>0),D6,"")

    This formula will return the number in D6 if both D6 and E6 contain numbers or nothing if they do not both contain numbers.
    This is a great idea under normal circumstances but the "text" stored in these two cells is #VALUE! and is the output from the FIND function.

    If I use the AND function as suggested the it outputs and error message when it meets #VALUE!. Obviously #VALUE! is not stored as text.

  5. #5
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: What forumula?

    Assuming that I'm correct in that your problem now is an error handler you can change your formula to this:
    =IF(ISERROR(D6*E6),"",IF(AND(D6>0,E6>0),D6,""))
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  6. #6
    Registered User
    Join Date
    09-01-2007
    Location
    St Neots, UK
    Posts
    11

    Re: What forumula?

    Quote Originally Posted by ron2k_1 View Post
    Assuming that I'm correct in that your problem now is an error handler you can change your formula to this:
    =IF(ISERROR(D6*E6),"",IF(AND(D6>0,E6>0),D6,""))
    Thanks for puttimg on the right track. With 2020 the function i, I believe, IFERROR

+ 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