+ Reply to Thread
Results 1 to 10 of 10

If cell contains text from a list, return value..

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    85

    If cell contains text from a list, return value..

    Thank you.
    Last edited by MushroomFace; 03-07-2015 at 07:30 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: If cell contains text from a list, return value..

    use VLookup for that.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    85

    Re: If cell contains text from a list, return value..

    Let's say A1 contained the following: "Expense Smith 5/2/15"

    Tab 2 contains
    Smith - JS
    Holt - AH

    I want my formula to bring back JS, by searching through the list. As there is a lot of data

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,873

    Re: If cell contains text from a list, return value..

    Try such array* formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in A1 is your "Expense Smith 5/2/15"
    and in sheet2 in column A names in column B initials.

    *)...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Best Regards,

    Kaper

  5. #5
    Registered User
    Join Date
    03-04-2015
    Location
    California
    MS-Off Ver
    2010
    Posts
    1

    Re: If cell contains text from a list, return value..

    Thank you Kaper! I was looking for the same thing as MushroomFace. It works fine on my side. I just modified the formula :
    =INDEX(Sheet2!$B$1:$B$10,SMALL(IF(ISNUMBER(FIND(Sheet2!$A$1:$A$10,A1)),ROW(Sheet2!$B$1:$B$10),""),1))

    Kudos.

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,873

    Re: If cell contains text from a list, return value..

    Hi zigfree92037,
    it does not matter - row numbers are the same in any sheet. so without sheetname! it is just shorter.
    Another example - one could write:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    but again - no point if formula is in sheet1

  7. #7
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    85

    Re: If cell contains text from a list, return value..

    Hi

    The formula is bringing back a "#Ref!" error, it is an array formula, that is working. Is ROW($B$1:$B$10) the list of values to bring back? Not used Row before.

    Thanks!

  8. #8
    Registered User
    Join Date
    01-07-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: If cell contains text from a list, return value..

    I had a similar scenario

    This is a solution from azumi
    Attached Files Attached Files

  9. #9
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,873

    Re: If cell contains text from a list, return value..

    If the above is not working then to solve the problem
    Quote Originally Posted by MushroomFace View Post
    The formula is bringing back a "#Ref!" error, it is an array formula ...
    ...

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  10. #10
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,873

    Re: If cell contains text from a list, return value..

    If the above is not working then to solve the problem and as I wrote:

    in A1 is your "Expense Smith 5/2/15"
    and in sheet2 in column A names in column B initials.
    and:

    Quote Originally Posted by MushroomFace View Post
    The formula is bringing back a "#Ref!" error, it is an array formula ...
    the suggestion is to folow the http://www.excelforum.com/forum-rule...rum-rules.html and ...

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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. Replies: 10
    Last Post: 09-18-2014, 09:36 AM
  2. [SOLVED] Check to see if a cell contains text from a list then return the corresponding text
    By crousseau989 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-21-2013, 12:06 PM
  3. Replies: 3
    Last Post: 06-17-2013, 01:09 PM
  4. If cell contains text1, text2 or text 3 return this text, otherwise return X
    By bukmanodrama in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2013, 09:24 AM
  5. [SOLVED] Look-up specific text and return a list of the satisfied text
    By careng in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2013, 01:13 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