+ Reply to Thread
Results 1 to 2 of 2

Extract Values into Column F if Condition is Met

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Extract Values into Column F if Condition is Met

    Looking for formula (non-array preferred) to look into column A in sheet named House, column A and column E in sheet named Here and extract desired values into column F. Values to be extracted into column F is based on the selection in C2 of sheet named House.

    See attached sample file.

    Example:
    If C2= First Name (sheet named House)
    Extracted values into column F of sheet named Here would be (since it satisfies the requirement for First Name selection in C2:
    Ah, John
    Ah, John

    If C2= Last Name (sheet named House)
    Extracted values into column F of sheet named Here would be (since it satisfies the requirement for First Name selection in C2:
    Akon, Oscar
    Akon, Oscar
    Allan, Ricux
    Bankinin, Taco
    Bankinin, Taco
    Bankinin, Taco
    Blue, Sky
    Bohn, Luck Anner
    Done, Christ
    Done, Christ
    Done, Christ
    Done, Christ
    Gonner, James
    Hartter, Cross
    Hartter, Cross
    Hartter, Cross
    Karlazo, Ross
    Mat, Elalere
    Mat, Elalere
    McDonald, Mil
    McDonald, Mil
    McDonald, Mil
    McDonald, Mil
    Obruko, Han
    Stall, Sharp
    Attached Files Attached Files
    Last edited by bjnockle; 02-08-2021 at 07:49 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365 Version 2501 64-bit
    Posts
    1,467

    Re: Extract Values into Column F if Condition is Met

    bjnockle,

    I use the attached formula provided by Dave Bruns of Exceljet.

    Does what you want without using an Array, or needing to seperate First or Family name, as it looks for any "string" in the list of names matching the Search criteria, whichever type of Name it is.

    Col B contains the Names, which are purged of Duplicate First/Family and Family/First pairs.
    Put one or more letters - case not an issue - in D5, and if you want you can limit the number of matches to the value you set in D8.
    Formula in G5 copied down will find all matches in Names containing the string:

    =IFERROR(IF(OR(search="",F5>ct),"",INDEX(Name,AGGREGATE(15,6,(ROW(Name)-ROW($B$5)+1)/ISNUMBER(SEARCH(search,Name)),F5))),"")

    If there is no String in D5, Col G remains blank, If the number of matches exceeds any limit you set in D8,the extra rows will be blank.

    If you want to add more names to the list, you need to extend the NAME range (or make it dynamic).

    Hope this helps

    Ochimus
    Attached Files Attached Files
    Last edited by Ochimus; 02-08-2021 at 09:30 PM.

+ 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. [SOLVED] Extract Data in Column B and Column C Into Column E and F Based on Condition in Column D
    By bjnockle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2021, 12:18 PM
  2. [SOLVED] Extract table headers & corresponding Column Values based on a condition
    By qadeerahmed in forum Excel General
    Replies: 5
    Last Post: 11-09-2020, 03:57 AM
  3. Replies: 2
    Last Post: 10-05-2018, 08:28 AM
  4. Extract values based on one condition
    By bjnockle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-26-2017, 04:24 AM
  5. [SOLVED] Extract values with condition (VBA)
    By izk630 in forum Excel General
    Replies: 3
    Last Post: 01-24-2017, 04:51 PM
  6. Extract corresponding multiple values after the condition is met
    By akshay20 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2015, 09:24 AM
  7. Extract values if condition is satisfied
    By bjnockle in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-26-2014, 08:39 AM

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