Qhov wikiHow no qhia koj li cas los tsim cov lej yooj yim rau Excel daim ntawv nthuav qhia.
Kauj ruam
Ntu 1 ntawm 3: Pab kom Macros
Kauj Ruam 1. Khiav Excel
Koj tuaj yeem ua cov txheej txheem tib yam los pab kom macros hauv Excel 2010, 2013, thiab 2016. Muaj qhov sib txawv me ntsis hauv Excel rau Mac, uas tau piav qhia hauv qab no.
Kauj ruam 2. Nyem rau File tab
Ntawm Mac, nyem rau "Excel" ntawv qhia zaub mov
Kauj Ruam 3. Nyem Xaiv
Ntawm Mac, nyem qhov "Nyiam" xaiv
Kauj Ruam 4. Nyem rau Customize Ribbon xaiv
Ntawm Mac, nyem "Ribbon & Toolbar" hauv ntu "Authoring"
Kauj Ruam 5. Kos rau lub npov tsim tawm hauv cov npe ntawm sab xis
Ntawm Mac, koj tuaj yeem pom "Tus Tsim Tawm" hauv "Tab lossis Pawg Npe" npe
Kauj Ruam 6. Nyem OK
Tus tsim tawm tab yuav tshwm nyob rau qhov kawg ntawm cov npe tab.
Ntu 2 ntawm 3: Kaw Macros
Kauj Ruam 1. Xyaum ua ntu ntu macro
Thaum kaw lub macro, txhua yam nyem lossis ua tiav yog kaw. Yog li, ib qho yuam kev tuaj yeem ua puas txhua yam. Ua qhov kev coj ua ntawm kev sau cov lus txib ob peb zaug yog li koj tuaj yeem ua nws yam tsis muaj kev poob siab thiab tsis muaj qhov nyem tsis raug.
Kauj Ruam 2. Nyem rau Tus Tsim Tawm tab
Kauj Ruam 3. Nyem Sau Macro
Qhov kev xaiv no nyob hauv ntu Code ntawm Excel's ribbon. Koj tseem tuaj yeem pib qhov tshiab macro los ntawm nias Alt+T+M+R yuam sij (Windows nkaus xwb).
Kauj Ruam 4. Npe lub macro
Siv lub npe paub tau yooj yim, tshwj xeeb tshaj yog tias koj xav tsim ntau macros.
Koj tseem tuaj yeem muab cov lus piav qhia los piav qhia txog kev ua haujlwm ntawm macro
Kauj Ruam 5. Nyem rau Shortcut key field
Koj tuaj yeem tsim cov keyboard luv kom cov macro tuaj yeem ua haujlwm tau yooj yim. Txawm li cas los xij, qhov no yog nyob ntawm yeem.
Kauj Ruam 6. Nias Shift qhov tseem ceeb thiab tsab ntawv
Cov keyboard ua ke ntawm Ctrl+⇧ Ua haujlwm+tsab ntawv yuav raug tsim los khiav cov lej.
Hauv Mac khoos phis tawj, cov keyboard ua ke yog Opt+⌘ Command+tsab ntawv
Kauj Ruam 7. Nyem rau Store Macro hauv cov ntawv qhia zaub mov
Kauj Ruam 8. Nyem rau qhov chaw uas koj xav khaws cov macro
Yog tias qhov loj tsuas yog siv rau daim ntawv nthuav tawm ntawm qhov no, tawm nws qhov chaw nyob hauv "Phau Ntawv Qhia Ua Haujlwm no". Yog tias koj xav kom siv macro rau txhua daim ntawv teev npe uas koj ua haujlwm nrog, xaiv "Personal Macro Workbook".
Kauj ruam 9. Nyem OK
Macro yuav pib kaw.
Kauj Ruam 10. Ua cov lus txib uas koj xav sau
Txhua yam koj ua ntawm qhov no yuav raug kaw thiab ntxiv rau qhov macro. Piv txwv li, yog tias koj siv cov lej sib npaug A2 thiab B2 hauv cell C7, Excel yuav ntxiv A2 thiab B2, thiab tom qab ntawd tso tawm qhov tshwm sim hauv C7 thaum koj khiav lub macro yav tom ntej.
Macros tuaj yeem nyuaj heev, thiab koj tseem tuaj yeem siv lawv los khiav lwm cov haujlwm hauv Office. Thaum cov ntaub ntawv macro, yuav luag txhua yam uas tau ua tiav hauv Excel tau ntxiv rau qhov loj
Kauj Ruam 11. Nyem Nthuav Tawm Cov Ntaub Ntawv thaum koj ua tiav
Cov ntaubntawv povthawj siv ntawm macro yuav xaus thiab qhov txiaj ntsig yuav raug cawm.
Kauj Ruam 12. Txuag cov ntawv hauv hom ntawv uas tau qhib rau mac
Txhawm rau kom macros ciaj sia, koj yuav tsum khaws phau ntawv ua haujlwm hauv Excel hom uas muaj macros qhib:
- Xaiv cov ntawv qhia zaub mov, tom qab ntawd nyem Txuag.
- Nyem rau File Type menu hauv qab daim ntawv npe lub npe.
- Nyem Excel Macro-Enabled Workbook.
Ntu 3 ntawm 3: Siv Macros
Kauj Ruam 1. Qhib phau ntawv ua haujlwm uas muaj macros qhib
Yog tias koj kaw cov ntaub ntawv ua ntej qhib lub macro, koj yuav raug hais kom qhib cov ntsiab lus.
Kauj Ruam 2. Nyem Enable Content
Qhov kev xaiv no yuav tshwm nyob rau sab saud ntawm daim ntawv Excel ntawm Kev Nyab Xeeb Kev Nyab Xeeb bar thaum twg phau ntawv ua haujlwm uas muaj macros qhib tau qhib. Txij li qhov no yog koj li ntaub ntawv, tau kawg koj tuaj yeem ntseeg nws. Txawm li cas los xij, ceev faj thaum qhib cov ntaub ntawv uas muaj lwm tus neeg siv macros qhib.
Kauj Ruam 3. Ntaus koj qhov luv luv
Yog tias koj xav siv macro, koj tuaj yeem ua nws nrawm los ntawm nias qhov luv uas koj tau tsim.
Kauj Ruam 4. Nyem rau Macros khawm hauv Tus Tsim Kho tab
Txhua qhov muaj nyob hauv koj daim ntawv nthuav tawm ntawm qhov no yuav raug nthuav tawm.
Kauj Ruam 5. Nyem qhov macro koj xav khiav
Kauj Ruam 6. Nyem rau Khiav khawm
Macro yuav khiav hauv koj lub cell lossis xaiv ntawm qhov no.
Kauj Ruam 7. Saib cov lej lej
Yog tias koj xav paub yuav ua li cas macro coding ua haujlwm ntau ntxiv, qhib cov lej macro koj tsim thiab tinker nrog nws cov ntsiab lus:
- Nyem rau khawm Macros nyob ntawm Tus Tsim Tawm tab.
- Nyem lub macro koj xav pom.
- Nyem Kho kom raug.
- Saib cov lej lej hauv Visual Basic code kho qhov program.