+ Reply to Thread
Results 1 to 3 of 3

Need to find a row in a table with a stocker ticker and text I specify

  1. #1
    Registered User
    Join Date
    10-06-2007
    Posts
    15

    Need to find a row in a table with a stocker ticker and text I specify

    I need a formula that looks at the value in cell A1 (which will be a stock ticker), and then references a table with stock tickers in column B and text in column C.
    The table goes from B1:C5
    It needs to find a row in column B1:B5 with the same ticker as A1 and also a text value I specify in column C1:C5
    Ticker Text

    B C
    ABC Red
    ABC Blue
    ABC Green
    ABC Yellow
    ABC Orange

    Cell A1 has the Ticker ABC
    The formula will be in cell A2
    The formula will look for a row with ABC and the text “Yellow”
    If it finds a match, it puts the word “Yes” in A2, if not it puts the word “No”.
    Is there an easy way to do this?

    Thanks.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Need to find a row in a table with a stocker ticker and text I specify

    I would put Yellow into a cell rather than hardcoding it into the function but you can use an array function. It must be entered with CNTRL SHFT ENTER instead of ENTER (you'll see brackets {} around it if done properly)

    =IF(ISNUMBER(MATCH(A1&"Yellow",$B$1:$B$5&$C$1:$C$5,0)), "Y", "N")

    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,791

    Re: Need to find a row in a table with a stocker ticker and text I specify

    Does this work for you?

    =IF(INDEX(Sheet2!B1:C5,MATCH("yellow",Sheet2!C1:C5,0),2)="Yellow","Yes","No")

    Edit: I concur with Chemist about not hardcoding the term "yellow"
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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