Excel find cells from range where search value is within the cell

前端 未结 1 994
挽巷
挽巷 2021-01-18 09:19

Once again I\'m struggling to find my answer on Google, but I\'m sure it must exist. Sorry if I come across as a novice: I am when it comes to Excel it seems!

What

相关标签:
1条回答
  • 2021-01-18 09:37

    I'm sure there is a better way, but if I'm understanding correctly, you could try SUM in combination with an array formula (enter with Ctrl+Shift+Enter):

    =IF(SUM(IFERROR(FIND(A1:E1,G1),0))>0, "FOUND", "NOT FOUND")
    

    Here, A1:E1 contained the individual years and G1 contained the single cell of years. This runs FIND on each cell in the range, returning a position if it finds a match in the target cell and returning 0 if not (IFERROR is a 2007 function - if you don't have Excel 2007, we can rewrite). You then sum the results of the FIND function and if it is greater than 0, it means you found a match somewhere.

    enter image description here

    0 讨论(0)
提交回复
热议问题