1. 濡備綍鐢╲lookup鍑芥暟鏌ユ壘騫惰繑鍥炴墍闇淇℃伅銆
1.涓涓猠xcel琛錛岄渶瑕佸湪鍙︿竴涓琛ㄤ腑鎵懼嚭鐩稿簲鍚屽︾殑鐝綰т俊鎮銆
2. excel涓鐨剉lookup鍑芥暟鎬庝箞涓嬈℃ф煡鎵懼緢澶氬垪鏁版嵁錛
浣跨敤Excel鐨刅LOOKUP鍑芥暟鏃犳硶瀹炵幇涓瀵瑰氬尮閰嶅苟鍏ㄩ儴鏄劇ず鍑烘潵銆
1. VLOOKUP鍑芥暟鐨勫熀鏈鍔熻兘錛歏LOOKUP鍑芥暟鏄疎xcel涓鐢ㄤ簬鍦ㄦ暟鎹琛ㄤ腑鎼滅儲鐗瑰畾鍊礆紝騫惰繑鍥炵浉搴旇岀殑鍏朵粬鍒椾腑鐨勫肩殑鍑芥暟銆傚畠鍦ㄤ竴瀵逛竴鍖歸厤鐨勬儏鍐典笅闈炲父鏈夋晥錛屼絾鏃犳硶鐩存帴澶勭悊涓瀵瑰氬尮閰嶃
2. 涓瀵瑰氬尮閰嶇殑姒傚康錛氫竴瀵瑰氬尮閰嶆槸鎸囧湪涓涓鏁版嵁琛ㄤ腑錛屼竴涓鐗瑰畾鐨勫煎彲鑳藉瑰簲澶氫釜鍏朵粬鍒椾腑鐨勫箋備緥濡傦紝鍦ㄥ㈡埛璁㈠崟鏁版嵁琛ㄤ腑錛屼竴涓瀹㈡埛鍙鑳芥湁澶氫釜璁㈠崟鍙蜂笌涔嬪瑰簲銆
3. VLOOKUP鍑芥暟鐨勯檺鍒訛細VLOOKUP鍑芥暟鍙鑳借繑鍥炰笌鎼滅儲鍊煎尮閰嶇殑絎涓琛屼腑鐨勫礆紝鑰屾棤娉曡繑鍥炴墍鏈夊尮閰嶈岀殑鍊箋傝繖鏄鍥犱負VLOOKUP鍑芥暟鐨勮捐″垵琛鋒槸涓轟簡涓瀵逛竴鍖歸厤錛屽畠娌℃湁鍐呯疆鐨勬満鍒舵潵澶勭悊涓瀵瑰氬尮閰嶇殑鎯呭喌銆
4. 瑙e喅鏂規堬細鉶界劧VLOOKUP鍑芥暟鏃犳硶鐩存帴瀹炵幇涓瀵瑰氬尮閰嶅苟鍏ㄩ儴鏄劇ず鍑烘潵錛屼絾鍙浠ラ氳繃鍏朵粬鏂規硶闂存帴瀹炵幇榪欎竴鐩鏍囥備竴縐嶅父鐢ㄧ殑鏂規硶鏄浣跨敤杈呭姪鍒楀拰鏁扮粍鍏寮忥紝灝嗗氫釜鍖歸厤鍊煎悎騫跺埌涓涓鍗曞厓鏍間腑鏄劇ず銆傚彟涓縐嶆柟娉曟槸浣跨敤鏇撮珮綰х殑鏁版嵁搴撴煡璇㈠伐鍏鳳紝濡係QL鎴朠ower Query錛屾潵澶勭悊涓瀵瑰氬尮閰嶇殑鎯呭喌錛屽苟灝嗙粨鏋滃煎叆鍒癊xcel涓榪涜屾樉紺恆
涓句緥璇存槑錛
鍋囪炬湁涓涓瀹㈡埛璁㈠崟鏁版嵁琛錛屽叾涓鍖呭惈瀹㈡埛濮撳悕銆佽㈠崟鍙峰拰璁㈠崟閲戦濈瓑淇℃伅銆傜幇鍦ㄩ渶瑕佹煡鎵劇壒瀹氬㈡埛鐨勬墍鏈夎㈠崟鍙楓
鏁版嵁琛ㄥ備笅錛
瀹㈡埛濮撳悕 | 璁㈠崟鍙 | 璁㈠崟閲戦
---------|-------|--------
寮犱笁 | 001 | 100
寮犱笁 | 002 | 200
鏉庡洓 | 003 | 150
鐜嬩簲 | 004 | 300
鐜嬩簲 | 005 | 400
渚嬪傦紝瑕佹煡鎵懼紶涓夌殑鎵鏈夎㈠崟鍙鳳紝鍙浠ヤ嬌鐢ㄨ緟鍔╁垪鍜屾暟緇勫叕寮忕殑鏂規硶銆傞栧厛鍦ㄨ緟鍔╁垪涓浣跨敤IF鍑芥暟鍒ゆ柇瀹㈡埛濮撳悕鏄鍚︿笌鐩鏍囧㈡埛錛堝紶涓夛級鍖歸厤錛屽傛灉鍖歸厤鍒欒繑鍥炶㈠崟鍙鳳紝鍚﹀垯榪斿洖絀哄箋傜劧鍚庝嬌鐢ㄦ暟緇勫叕寮忓皢杈呭姪鍒椾腑鐨勯潪絀哄煎悎騫跺埌涓涓鍗曞厓鏍間腑銆傚叿浣撴ラゅ備笅錛
1. 鍦―2鍗曞厓鏍艱緭鍏ュ叕寮忥細=IF(A2="寮犱笁", B2, "")錛屽苟灝嗗叕寮忔嫋鍔ㄥ~鍏呰嚦D6鍗曞厓鏍箋傝繖灝嗗壋寤轟竴涓杈呭姪鍒楋紝鍏朵腑鍖呭惈浜嗕笌鐩鏍囧㈡埛鍖歸厤鐨勮㈠崟鍙鋒垨絀哄箋
2. 鍦‥2鍗曞厓鏍艱緭鍏ユ暟緇勫叕寮忥細=TEXTJOIN(",", TRUE, IF($A$2:$A$6="寮犱笁", $B$2:$B$6, ""))銆傝繖涓鍏寮忎嬌鐢ㄤ簡TEXTJOIN鍑芥暟鍜孖F鍑芥暟鐨勭粍鍚堬紝灝嗚緟鍔╁垪涓闈炵┖鐨勮㈠崟鍙峰悎騫跺埌涓涓鍗曞厓鏍間腑錛屽苟鐢ㄩ楀彿鍒嗛殧銆傛敞鎰忚佷嬌鐢–trl+Shift+Enter閿杈撳叆鏁扮粍鍏寮忋
3. E2鍗曞厓鏍煎皢鏄劇ず鈥001,002鈥濓紝鍗沖紶涓夌殑鎵鏈夎㈠崟鍙楓