0

I am wondering if I can write a function to search a column in my spreadsheet for a specific name, then return x number of values within the row(s) that contain the name. For example...

enter image description here

M4 holds the function. The function searches Columns D, G, and J to find a match of the name in L4 (Owen). Owen's name can occur multiple times in following rows. The function returns a cell value, say B4, in M4.

0

function searches columns D, G, and J to find a match of the name in L4. the function returns a cell value, say B4, in M4

  • paste in M4 cell:

    =IF(IFERROR(VLOOKUP(L4, {D:D;G:G;J:J}, 1, 0))<>"", B4, )

  • If the lookup column (the first column of range) contains 2 or more values exactly equal to search_key, the 1st value found is returned. How do I implement a search to continue searching down the column for another instance of the search_key and summate the results? – Elliot Pressman Mar 21 at 14:12
0

How do I implement a search to continue searching down the column for another instance of the search_key and summate the results

  • paste in M4 cell:

    =COUNTA(IFERROR(QUERY({D:D;G:G;J:J}, "where Col1 contains '"&L4&"'", 0)))*B4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.