+ Reply to Thread
Results 1 to 4 of 4

Formula required for when a certain text appears in a cell

  1. #1
    Registered User
    Join Date
    03-21-2014
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Formula required for when a certain text appears in a cell

    Hi,
    I am relatively new to Excel.

    I am looking for a formula which will allow for a particular persons name from a list of names appearing in one cell, to have a
    certain title appear in another cell.

    For example.

    If I have 12 employees, ten being "workers" and another two being "supervisors", if one of the names of
    the 10 "workers" appears in say cell A1, Excel will automatically recognise the name as a "worker" and place that title
    in say cell B1, alternatively, if the name of one of the two 'supervisors' appears in cell A1, Excel will automatically place the title of
    'supervisor' in cell B1.

    Any help would be greatly appreciated.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Formula required for when a certain text appears in a cell

    Let's pretend you have this list of names and titles in G2:H13.

    B1:

    =INDEX($H$2:$H$13,MATCH(A1,$G$2:$G$13,0))

    or

    =LOOKUP(2,1/($G$2:$G$13=A1),$H$2:$H$13)

    or

    =VLOOUP(A1,$G$2:$H$13,2,0)

    And then copy downwards
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Formula required for when a certain text appears in a cell

    Hi and welcome to the forum

    If you only have 2 names, try this...

    =IF(OR(A1="xxx",A1="yyy"),"supervisor","worker")

    If you start having more than 3 or 4 names (or more than 2-3 categories), then it would probably be better to create a small table, with name and category, then use a VLOOKUP() to pull in thye category
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    03-21-2014
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Formula required for when a certain text appears in a cell

    Thanks for your help. I used the VLOOKUP.

    Ta/

+ 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. Formula required to copy text from one sheet/cell to another
    By Jedidog1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2013, 05:56 PM
  2. Replies: 3
    Last Post: 10-02-2012, 06:17 AM
  3. Replies: 6
    Last Post: 08-22-2011, 09:50 AM
  4. text appears in formula bar but not in cell
    By lsparks in forum Excel General
    Replies: 8
    Last Post: 12-05-2008, 06:55 PM
  5. Replies: 1
    Last Post: 08-29-2005, 05:05 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