+ Reply to Thread
Results 1 to 8 of 8

Match part of cell from another column, return corresponding text

  1. #1
    Registered User
    Join Date
    05-17-2019
    Location
    edinburgh
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    3

    Match part of cell from another column, return corresponding text

    I've been trying to get this to work for far too long, tearing my hair out now so looking for some help...so help me...please!

    Using 2 reports I pull off of our finance system, I get 2 sheets of data, which I've pasted into one document.

    The attached are these reports on a much smaller scale - sheets 'Overheads' and 'Active Grants'.

    What I'm trying to do is -

    Firstly - on the 'Overheads' sheet, I need to find a formula for column H, to pull the name of the Principal Investigator, from the 'Active Grants' sheet. The formula doesn't currently work, because column F contains more than the text I'm searching for, and I don't know how to work around that?

    Secondly - Is there a way to pull the Research Job Code that corresponds, and enter that in column I?

    Finally - The name of the 'Principal Investigator' (column B) on 'Active Grants' tab can be in various formats (Dr Black, Ian Black, Dr Ian Black, Black I Dr), is there any kind of formula to standardise that?

    Thanks for any help you can give me on this one...I'm so lost with it!
    Attached Files Attached Files

  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,053

    Re: Match part of cell from another column, return corresponding text

    Try this, in H2:
    =IF(D2< 1300, VLOOKUP(I2,'Active Grants'!A:B,2,FALSE),"not direct Income")

    and this, in I2:
    =IFERROR(LOOKUP(1000,SEARCH('Active Grants'!$A$2:$A$10,F2),'Active Grants'!$A$2:$A$10),"")

    I am not entirely sure what you want... and where you want it in regard to your last query.

    See sheet.
    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
    05-17-2019
    Location
    edinburgh
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    3

    Re: Match part of cell from another column, return corresponding text

    That's great! Looks like exactly what I want. Thank you!

    With regards to my last query, I'll try to explain it a little better -

    The report I pull that gives me the 'Active Grants' sheet comes from a Research Grants system, where data is input by a central Research department. When they input the name of the principal investigator, they don't use a standard format for it. So it can be entered as Dr Black, Dr Malcolm Black, Malcolm Black, Black M Dr. This means when I create a pivot table, I get separate entries in there for each of the different methods of entering the name. I'd like for them to be joined up, but not sure there's a way of doing it.

    Does that make sense?

  4. #4
    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,053

    Re: Match part of cell from another column, return corresponding text

    Is there a staff number associated with each PI that can be downloaded from the SAME Research Grants system? If so, it could then be used with a simple VLOOKUP with two columns Staff Number and "Preferred" Name.

    Otherwise, any LOOKUP arrangement my fail if you have two Dr Blacks... Ian and Gertie.... Telling Dr Black from Dr Black may be problematic.

  5. #5
    Registered User
    Join Date
    05-17-2019
    Location
    edinburgh
    MS-Off Ver
    MS Office Pro Plus 2016
    Posts
    3

    Re: Match part of cell from another column, return corresponding text

    Nah, unfortunately not. I can work with it the way it is though, while not perfect - it's close enough!

    However, I have found one more problem -

    Is there a way to use the formula you gave me, for Research Job Code on 'Overheads' tab - =IFERROR(LOOKUP(1000,SEARCH('Active Grants'!$A$2:$A$10,F2),'Active Grants'!$A$2:$A$10),"") - so that I can add more lines to the spreadsheet without having to update the formula? The way it is, it only checks between A2 and A10, I tried to change it to $A$2:$A$10000 but that just gave me '0' for all answers. Do I have to update the formula, and enter the bottom row number where it has 10?

  6. #6
    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,053

    Re: Match part of cell from another column, return corresponding text

    Yup. You need a Named range (CTRL-f3 to view/edit). i set one up, imaginatively called "List".

    ='Active Grants'!$A$2:INDEX('Active Grants'!$A:$A,MATCH("zzz",'Active Grants'!$A:$A))

    It will expand the range of cells in from a2 to the end of the data series.

    Then the formula in I becomes:

    =IFERROR(LOOKUP(1000,SEARCH(List,F2),List),"")

    see sheet.
    Attached Files Attached Files

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Match part of cell from another column, return corresponding text

    Hi

    Here an array formula solution to find Research Job Code
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ...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.

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Match part of cell from another column, return corresponding text

    Or this to a regular formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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] Can Excel return only part of the text in a cell?
    By AccountingJ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2018, 02:21 PM
  2. Replies: 14
    Last Post: 11-04-2014, 02:41 PM
  3. Search a column for 2 conditions and display the cell content of last match
    By ansridhar in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-17-2014, 06:41 AM
  4. Replies: 7
    Last Post: 01-24-2013, 06:55 PM
  5. Replies: 1
    Last Post: 08-02-2012, 11:39 PM
  6. 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
  7. Replies: 5
    Last Post: 04-08-2012, 01:06 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