Comparing two columns in Excel with exclusion

后端 未结 2 742
死守一世寂寞
死守一世寂寞 2021-02-04 16:44

I want to compare values in two columns in Excel as depicted in the image below :- \"enter

<
2条回答
  •  不知归路
    2021-02-04 17:19

    The following will work - for each, add the formula in row 2 and then drag down

    Values of A that do not exist in B

    =IF(ISERROR(MATCH($A$2:$A$20,$B$2:$B$17,0)),A2,"")
    

    Result = x, y, z, i, j ,k, l, u

    NB: Your example spreadsheet is incorrect as u is in Col A but not Col B but you do not list it in your result set in Col C

    Values of B that do not exist in A

    =IF(ISERROR(MATCH($B$2:$B$17,$A$2:$A$20,0)),B2,"")
    

    Result = q, r, e, f, g

提交回复
热议问题