Yuav Ua Li Cas Tsim Macro Hauv Excel

Cov txheej txheem:

Yuav Ua Li Cas Tsim Macro Hauv Excel
Yuav Ua Li Cas Tsim Macro Hauv Excel
Anonim

Yuav Paub

  • Qhib Developer tab thiab xaiv Record Macro. Ntxiv ib lub npe thiab shortcut rau macro. Nyob rau hauv lub drop-down, xaiv No Workbook > OK.
  • Ib zaug tsim, ua formatting commands rau lub macro tshiab, ces xaiv Stop Recording > File > Save As . Txuag ua ib qho .xlsm file.
  • The Tus tsim tawm tab tsis pom los ntawm lub neej ntawd. Txhawm rau pab, qhib Options (PC) lossis Preferences (Mac). Qhib Ribbon nqis, xaiv Developer.

Microsoft Excel qhov kev teeb tsa ntawm daim ntawv nthuav qhia, kev muaj peev xwm ua qauv, thiab cov qauv ua haujlwm tso cai rau koj ua haujlwm rov ua dua. Koj tuaj yeem txhim kho cov haujlwm no ntxiv los ntawm kev siv macros. Kawm paub yuav ua li cas nrog Excel rau Microsoft 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel rau Microsoft 365 rau Mac, Excel 2019 rau Mac, thiab Excel 2016 rau Mac.

Yuav ua li cas tso saib Tus Tsim Tab hauv Excel rau Microsoft 365, Excel 2019, Excel 2016, Excel 2013, thiab Excel 2010

Ua ntej koj ntxiv macros hauv Excel, tso saib tus tsim tawm tab ntawm kab. Los ntawm lub neej ntawd, tus tsim tawm tab tsis pom.

  1. Mus rau File tab thiab tom qab ntawd xaiv Options.

    Image
    Image
  2. In the Excel Options dialog box, xaiv Customize Ribbon.

    Image
    Image
  3. In the Customize the Ribbon daim ntawv, mus rau Main Tabs thiab xaiv ntu Developerkos lub thawv.

    Image
    Image
  4. Xaiv OK txhawm rau ntxiv tus tsim tawm tab rau lub ribbon.

Yuav ua li cas Tsim Macro hauv Excel rau Microsoft 365, Excel 2019, Excel 2016, Excel 2013, thiab Excel 2010

Thaum koj npaj los tsim macro, pib Excel thiab qhib daim ntawv ua haujlwm.

Macros tsis tuaj yeem tsim lossis khiav hauv Excel Online. Txawm li cas los xij, Excel Online qhib cov ntawv ua haujlwm uas muaj macros. Koj tuaj yeem hloov pauv cov ntawv ua haujlwm thiab txuag cov ntawv ua haujlwm hauv Excel Online yam tsis muaj kev cuam tshuam macros.

  1. mus rau Tus tsim tawmtab.
  2. In the Code pab pawg, xaiv Record Macro.

    Image
    Image
  3. Nyob hauv Macro Lub Npe lub thawv ntawv, sau lub npe piav qhia rau macro.

    Image
    Image
  4. Enter a shortcut key rau macro.

    Image
    Image
  5. Xaiv tus Khaws Macro Hauv nqes xub thiab xaiv Phau Ntawv no.

    Image
    Image
  6. Xaiv OK.
  7. Ua qhov formatting thiab cov lus txib koj xav kom suav nrog hauv macro.

  8. Xaiv Stop Recording thaum koj ua tiav.

    Image
    Image
  9. Mus rau File tab thiab tom qab ntawd xaiv Save As lossis nias F12.

    Image
    Image
  10. In the Txuag As dialog box, sau ib lub npe ntaub ntawv rau phau ntawv ua haujlwm.

    Image
    Image
  11. Xaiv tus Txuag raws li Hom poob xub, xaiv Excel Macro-Enabled Workbook thiab tom qab ntawd xaiv Txuag.

    Image
    Image

Yuav ua li cas tso saib Tus Tsim Tab hauv Excel rau Microsoft 365 rau Mac, Excel 2019 rau Mac, thiab Excel 2016 rau Mac

Ua ntej koj ntxiv macros hauv Excel rau Microsoft 365 rau Mac lossis hauv Excel 2019 lossis 2016 ntawm Mac, tso saib Tus Tsim tawm tab ntawm kab. Los ntawm lub neej ntawd, tus tsim tawm tab tsis pom.

  1. Mus rau Excel thiab xaiv Preferences.

    Image
    Image
  2. Xaiv Ribbon & Toolbar.

    Image
    Image
  3. In the Customize the Ribbon, mus rau ntu Main Tabs thiab xaiv cov Developerkos lub thawv.

    Image
    Image
  4. Xaiv Save.

Yuav ua li cas Tsim Macro hauv Excel rau Microsoft 365 rau Mac, Excel 2019 rau Mac, thiab Excel 2016 rau Mac

Thaum koj npaj los tsim macro, pib Excel thiab qhib daim ntawv ua haujlwm.

  1. mus rau Tus tsim tawmtab.
  2. In the Code pab pawg, xaiv Record Macro.

    Image
    Image
  3. Nyob hauv Macro Name lub thawv ntawv, sau lub npe rau macro.
  4. Nyob hauv Shortcut key lub thawv ntawv, ntaus tus ntawv me lossis ntawv loj uas koj xav siv.
  5. Xaiv tus Kho macro hauv poob xub thiab xaiv Phau Ntawv no.

    Image
    Image
  6. Xaiv OK.
  7. Ua qhov formatting thiab cov lus txib koj xav kom suav nrog hauv macro.
  8. Thaum koj ua tiav, mus rau Developer tab thiab xaiv Stop Recording.
  9. Mus rau File tab thiab xaiv Save As los yog, nias Shift+ Command+ S

    Image
    Image
  10. Nyob hauv Save As dialog box, sau ib lub npe ntaub ntawv rau phau ntawv ua haujlwm.
  11. Xaiv lub File Format poob xub, xaiv Excel Macro-Enabled Workbook (.xlsm). Ces xaiv Save.

    Image
    Image

Yuav ua li cas khiav Macro

Thaum koj xav khiav macro koj tsim hauv Excel, siv qhov shortcut koj muab rau macro lossis khiav macro los ntawm Developer tab.

Txhawm rau khiav macro siv tus yuam sij shortcut ua ke, qhib daim ntawv ua haujlwm uas muaj cov macro. Nkag mus lossis xaiv cov ntaub ntawv uas koj xav siv cov formatting lossis cov lus txib suav nrog hauv macro. Tom qab ntawd, nias qhov tseem ceeb ua ke muab rau macro.

Txhawm rau khiav macro los ntawm Developer Tab, qhib daim ntawv ua haujlwm uas muaj cov macro, tom qab ntawd ua raws cov kauj ruam no:

  1. Hauv Excel, sau cov ntaub ntawv uas koj xav siv cov formatting lossis cov lus txib uas koj suav nrog hauv macro.
  2. mus rau Tus tsim tawmtab.

    Image
    Image
  3. In the Code pawg, xaiv Macros.

    Image
    Image
  4. Nyob hauv Macro dialog box, xaiv lub npe muab rau lub macro, ces xaiv Run.

    Image
    Image

How to Change the Macro Shortcut Key

Txhawm rau ntxiv lossis hloov tus yuam sij shortcut rau macro:

  1. mus rau Tus tsim tawmtab.
  2. In the Code pawg, xaiv Macros.
  3. Nyob rau hauv Macros dialog box, xaiv lub npe ntawm macro uas koj xav muab los yog hloov cov yuam sij shortcut ua ke.
  4. Xaiv Options.
  5. Nyob hauv Macro Options dialog box, mus rau Shortcut key ntawv lub thawv, ntaus tus ntawv me lossis ntawv loj los siv rau ua ke shortcut, thiab ces xaiv OK.

Pom zoo: