Lub luag haujlwm SUBSTITUTE hloov cov lus, ntawv nyeem, lossis cov cim uas twb muaj lawm nrog cov ntaub ntawv tshiab. Siv SUBSTITUTE muaj nuj nqi kom tshem tawm cov cim tsis luam tawm los ntawm cov ntaub ntawv tuaj txawv teb chaws, hloov cov cim tsis xav tau nrog qhov chaw, thiab tsim cov qauv sib txawv ntawm tib daim ntawv ua haujlwm.
Cov lus qhia hauv kab lus no siv rau Excel 2019, 2016, 2013, 2010, 2007; Excel rau Microsoft 365, Excel Online, Excel rau Mac, Excel rau iPad, Excel rau iPhone, thiab Excel rau Android.
SUBSTITUTE Function Syntax
A muaj nuj nqi syntax yog hais txog kev teeb tsa ntawm txoj haujlwm thiab suav nrog lub luag haujlwm lub npe, cov hlua khi, thiab cov lus sib cav.
Cov lus sib dhos rau SUBSTITUTE muaj nuj nqi yog:
=SUBSTITUTE(Text, Old_text, New_text, Instance_num)
Cov lus sib cav rau txoj haujlwm yog:
- Text (yuav tsum tau): Cov ntaub ntawv uas muaj cov ntawv yuav hloov. Qhov kev sib cav no tuaj yeem muaj cov ntaub ntawv tiag tiag uas muaj nyob rau hauv cov lus hais (saib kab 2 hauv daim duab saum toj no) lossis ib lub xovtooj siv rau qhov chaw ntawm cov ntaub ntawv hauv daim ntawv ua haujlwm (saib kab 3 thiab 4).
- Old_text (yuav tsum tau): Cov ntawv yuav tsum tau hloov.
- New_text (yuav tsum tau): Cov ntawv uas yuav hloov Old_text.
- Instance_num (yeem): Tus lej. Yog tias tus lej no raug rho tawm, txhua qhov piv txwv ntawm Old_text hloov nrog New_text. Yog tias tus lej no suav nrog, qhov piv txwv ntawm Old_text tau teev tseg yog hloov pauv (saib kab 5).
Cov lus sib cav rau SUBSTITUTE muaj nuj nqi yog cov ntaub ntawv nkag siab. Yog tias cov ntaub ntawv nkag rau Old_text argument tsis muaj tib yam li cov ntaub ntawv hauv Text argument cell, tsis muaj kev hloov pauv tshwm sim.
Siv lub SUBSTITUTE Function
Txawm hais tias nws muaj peev xwm ntaus tag nrho cov mis manually rau hauv daim ntawv xovtooj ntawm tes, lwm qhov kev xaiv yog siv Function Arguments dialog box (los yog Formula Builder hauv Excel rau Mac) nkag mus rau cov haujlwm thiab nws cov lus sib cav rau hauv lub xovtooj..
=SUBSTITUTE(A3, "Kev Muag Khoom", "Cov Nyiaj Tau Los")
Thaum koj siv lub thawv sib tham, Excel saib xyuas kev sib cais txhua qhov kev sib cav nrog tus lej cim thiab nws muab cov ntaub ntawv qub thiab cov ntawv tshiab hauv cov lus hais.
-
Nkag mus rau cov ntaub ntawv rau kev qhia hauv daim ntawv ua haujlwm Excel dawb.
- Xaiv tes B3 los ua kom nws lub cev muaj zog.
- Xaiv Formula.
- Xaiv Text txhawm rau qhib cov ntawv sau ua haujlwm poob.
-
Xaiv SUBSTITUTE nyob rau hauv cov npe qhib lub Function Arguments dialog box. Hauv Excel rau Mac, Formula Builder qhib.
- Muab tus cursor rau hauv Textntawv lub thawv.
- Xaiv tes A3 ntawm daim ntawv ua haujlwm kom nkag mus rau qhov kev siv ntawm tes.
- Muab tus cursor rau hauv Old_text ntawv lub thawv.
- Nkag Sales. Nov yog cov ntawv nyeem uas yuav raug hloov. Tsis tas yuav kaw cov ntawv hauv cov lus hais.
- Tau tus cursor rau hauv New_text ntawv lub thawv.
-
Enter Revenue. Cov ntawv no yuav raug hloov pauv rau Kev Muag Khoom.
- Cov lus sib cav_num tau tso tseg vim tsuas muaj ib qho piv txwv ntawm lo lus Muag hauv cell A3.
- Xaiv OK. Tsuas yog hauv Excel rau Mac, qhov twg koj xaiv Done.
- Daim Ntawv Qhia Nyiaj Tau Los tshwm nyob hauv cell B3.
SUBSTITUTE vs. REPLACE Functions
SUBSTITUTE txawv ntawm REPLACE muaj nuj nqi nyob rau hauv uas nws yog siv los pauv cov ntawv tshwj xeeb ntawm txhua qhov chaw hauv cov ntaub ntawv xaiv. REPLACE yog siv los hloov cov ntawv nyeem uas tshwm sim ntawm qhov chaw tshwj xeeb hauv cov ntaub ntawv.