+ Reply to Thread
Results 1 to 4 of 4

match text from two books, and a word from second book and return value from 4th column

  1. #1
    Registered User
    Join Date
    02-24-2017
    Location
    USA
    MS-Off Ver
    2013
    Posts
    20

    match text from two books, and a word from second book and return value from 4th column

    I have a rather difficult request, or at least difficult for me to figure out. I was able to do the index match to pull the initials based on matching the ID numbers, but need it to also Match the word "Active". If the word ACTIVE isn't there, an IFERROR statement, to put "Company Expense".

    The information is in two workbooks.

    First workbook has ID numbers(columnA), and column I (where I want the formula)

    Second workbook has ID (columnA) and whether the account is active or inactive(ColumnH). Also has client initials(columnB).

    I need a formula in book1 that looks at the ID in both books, and looks in columnH of second book for the word "Active", then returns columnB(Initials) to book one in columnI.

    All help is greatly appreciated.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: match text from two books, and a word from second book and return value from 4th colum

    Next time, please attach a sample worksheet. Normally I never want to spend time recreating what you already have in front of you. With both sheets open, this array formula:

    =IFERROR(INDEX('[Copy FROM.xlsx]Sheet1'!$B$2:$B$7,MATCH(1,('[Copy FROM.xlsx]Sheet1'!$A$2:$A$7=A2)*('[Copy FROM.xlsx]Sheet1'!$H$2:$H$7="Active"),0)),"")

    When the file is closed, the formula becomes:

    =IFERROR(INDEX('C:\Users\DGlenn\Desktop\[Copy FROM.xlsx]Sheet1'!$B$2:$B$7,MATCH(1,('C:\Users\DGlenn\Desktop\[Copy FROM.xlsx]Sheet1'!$A$2:$A$7=A2)*('C:\Users\DGlenn\Desktop\[Copy FROM.xlsx]Sheet1'!$H$2:$H$7="Active"),0)),"")

    showing the FULL path down from C:\ to the source file.

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-24-2017
    Location
    USA
    MS-Off Ver
    2013
    Posts
    20

    Re: match text from two books, and a word from second book and return value from 4th colum

    First, I apologize for making you create the sheets yourself.

    Second, THANK YOU SO VERY MUCH! Worked perfectly.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: match text from two books, and a word from second book and return value from 4th colum

    Was this an Outlook or an Excel query???
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] Need to import from Multiple excel books into Master book based on one column
    By Bala Daniel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2016, 06:11 PM
  2. VBA - search books for value, return row to current book - please help
    By mrshl9898 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2015, 01:11 AM
  3. book or books for Excel for Mac 2011
    By eljefethecorgi in forum Excel General
    Replies: 3
    Last Post: 04-10-2015, 08:04 PM
  4. open books,ink cells and then save books and move on to the next book
    By Desmond_Mocumi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2013, 02:34 PM
  5. [SOLVED] Two Excel sheets trying to match text data and return the match from the second column!
    By bankcott in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2013, 02:17 PM
  6. [SOLVED] Simple formula to match column A, sheet1, with column A, sheet2, return text answer
    By Connie5761 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-14-2012, 02:56 PM
  7. Find and Match Text in Column Return Adjacent Cell
    By biancam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2012, 02:45 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