searching in excel

2007-01-18 6:43 pm
what is the code if i want to search the following situation in excel?

i have a column in sheet 1

abc
bcd
efg
xyz
and so on

and i have a very big worksheet in sheet 2, with around 10000 cells, some might contain the data in sheet 1.

now i want to search if that particular text in sheet 1 is appearing in sheet 2, how?

回答 (2)

2007-01-20 9:50 am
vlookup 一定要 to be exact, 故不能解決你的問題

countif 可以 not to be exact, 但要加上通配字元(Wild Card), 即 * , 其他 Wild Card 如 ? # [ ] [! ], 在你的問題上不適用, Countif 祇能計算出現次數, 不能傳回 sheet2 的cell內容, 方法是:
Sheet1!B1輸入公式 =COUNTIF(SHEET2!A1:A10000,“*”& A1 & “*”)
然後下拉, 完成。
注意: countif 函數 會視 ABC 與 abc 為相同
2007-01-18 7:41 pm
用vlookup function 啦

首先係sheet 1 , 最尾個column 打 =vlookup( a, b, c, d)

a= table or sheet you look up for ( your case is "sheet 2" , juz high light sheet 2)

b= the cell or value in sheet 1 you want to search

c= the column number ( eg, if you type "3" , that mean the answer comes out is the column 3 of sheet 2)

d= true or false ( "false" means u need exactly the same when matching)(i think your case need to fill "false")

( **** note:佢會對sheet 2 第一個column , 即係佢會幫你自動match sheet 2 既 column 1 同 sheet 1 既 cell ( 你係 "b " 填果個cell) , match 到之後就會出 "c" 既答案)

2007-01-18 11:43:56 補充:
你要match abc 同abcc ~咁 "d" 果度就要填true , 唔係填false ~~~
參考: 自己 -----希望你明白我講乜啦~~好難解釋你知vlookup 點用, 不過呢個function 真係好好用~


收錄日期: 2021-04-13 00:14:13
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070118000051KK00719

檢視 Wayback Machine 備份