+ Reply to Thread
Results 1 to 5 of 5

Search for specific values in a column, and return values of another range of cells

  1. #1
    Registered User
    Join Date
    10-01-2015
    Location
    Vancouver, Canada
    MS-Off Ver
    Mac Excel 2011
    Posts
    3

    Search for specific values in a column, and return values of another range of cells

    Hi All,

    I've been scouring the internet trying to find the correct formula for what I'm trying to accomplish. I feel like I'm really close on using an INDEX MATCH, but I'm not sure of the keystrokes to achieve what I need.

    I am trying to build a sheet that will compile a list of Fixture Numbers into a sheet, based on a value I've entered for them in another column. I've attached an excel file of what I'm attempting to accomplish.

    If a value 1.1 is entered anywhere in Column C, then return the adjacent values of the Fixture Numbers in Column A, into Columns F and G. Example, for circuit 1.1, then Fixture Numbers 101 and 102 need to be returned in Columns F and G.

    Example, for circuit 1.2, then Fixture Number 201 needs to be returned in Column F


    If anyone out there an help me solve this, its been driving me crazy for days. Thank you so much.....Please let me know if I can explain this any differently to make it more clear.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search for specific values in a column, and return values of another range of cells

    F2: =IFERROR(INDEX(A:A, MATCH(E2,$C:$C, 0)), "")
    G2: =IFERROR(IF(COUNTIF(C:C, E2)>1, LOOKUP(2, 1/($C$1:$C$100=E2), $A$1:$A$100), ""), "")

    Copied down.

    This only works for TWO values, it shows the first and last instances for each circuit number. IF there were THREE or more instances, you wouldn't get the ones in the middle.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-01-2015
    Location
    Vancouver, Canada
    MS-Off Ver
    Mac Excel 2011
    Posts
    3

    Re: Search for specific values in a column, and return values of another range of cells

    any idea if there would be a way to return up to 6 instances?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search for specific values in a column, and return values of another range of cells

    Always adjacent in the raw data?

  5. #5
    Registered User
    Join Date
    10-01-2015
    Location
    Vancouver, Canada
    MS-Off Ver
    Mac Excel 2011
    Posts
    3
    Quote Originally Posted by JBeaucaire View Post
    Always adjacent in the raw data?
    Yes, there could be up to 6 instances under the "fixture number" column that could correspond with a circuit number in that column.

    This is why I've been having so much trouble with this, I can't wrap my head around the multiple instances

+ 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. Search range of cells for specific values / automated colour updates
    By TokyoClownAttack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2014, 11:31 AM
  2. Replies: 1
    Last Post: 07-03-2013, 12:14 AM
  3. Function to search Column for a range of values and return TRUE or FALSE
    By BamBamMoneyBags in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-05-2013, 05:59 AM
  4. Replies: 4
    Last Post: 12-21-2012, 10:35 AM
  5. Replies: 13
    Last Post: 10-31-2012, 05:06 PM
  6. search a cell for values in a range, return values found
    By carpe.cervisiam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2011, 12:52 PM
  7. Macro Loop to Extract Specific Values and Min/Max Values From Column/Rows Range
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-19-2010, 09:19 AM
  8. Search and return values in a range Group
    By mrdata in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 02-21-2008, 05:31 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