简体   繁体   中英

Excel - Search value in row and then put a symbol to the the corresponding column

I have an excel file looks like this:

ROW 1      1 2 3 4 
ROW 2      2 5 6 7 8
ROW 3      3 4 6 7 8  

How can seach each row's cell value and then put a symble on the corresponding column? Sample Output:

Column Name 1 2 3 4 5 6 7 8 - I have this row now
ROW 1       * * * *
ROW 2         *     * * * *
ROW 3           * *   * * *

Is there any recommendations on how to achieve this or similar results?

Updated: My initial data is Sheet1 A1 to AV450. The result should be show in Sheet2 A2 to EN 451. Sheet2 A1 to EN1 is a list of values that should be matched. Same sheet or not doesn't matter.

Thank you very much.

assuming your initial rows are in Sheet1!A1 to F3

and your results in Sheet2!A1 to I4

put in cell Sheet2!B2 :

=if(not(iserror(match(B$1,Sheet1!A2:A3,0))),"*","")

Then you can extend the formula.

Match will return you the number of the cell in the searched matrix that contains the value, and "#NA" if the value is not found (thus is you don't want a "*" in the result)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM