Amafomu okufaka imininingwane ye-Microsoft Excel

Ukuze wenze ukungena kwedatha etafuleni ku-Excel, ungasebenzisa amafomu akhethekile azosiza ukusheshisa inqubo yokugcwalisa ibanga letafula ngolwazi. Ku-Excel kunethuluzi elakhelwe ngaphakathi elivumela ukugcwaliswa ngendlela efanayo. Umsebenzisi angakwazi futhi ukudala i-version yakhe yefomu, ezobe yenziwe ngokuvumelana nezidingo zayo ngokusebenzisa i-macro yalokhu. Ake sibheke ukusetshenziswa okuhlukahlukene kwala mathuluzi agcwalisayo e-Excel.

Ukusebenzisa amathuluzi okugcwalisa

Ifomu lokugcwalisa yinto enezinsimu amagama abo afana namagama ekholomu yamakholomu etafuleni egcwele. Kulezi zinkambu udinga ukufaka idatha futhi zizofakwa ngokushesha emgqeni omusha ebangeni letafula. Ifomu ingasebenza njengethuluzi elikhethiwe elenziwe ngaphakathi kwe-Excel, noma lingabekwa ngokuqondile ephepheni ngesimo sobubanzi bayo, uma lenziwe ngumsebenzisi uqobo.

Manje ake sibheke ukuthi singasebenzisa kanjani lezi zinhlobo ezimbili zamathuluzi.

Indlela 1: Into yokufaka yedatha eyakhelwe ngaphakathi kwe-Excel

Okokuqala, ake sifunde ukuthi singasebenzisa kanjani ifomu lokufaka idatha lokufakwa kwe-Excel.

  1. Kumele kuqashelwe ukuthi ngokuzenzakalelayo isithonjana esiqala sifihlekile futhi sidinga ukusebenza. Ukuze wenze lokhu, iya kuthebhu "Ifayela"bese uchofoza into "Izinketho".
  2. Ewindini le-Excel yemingcele evuliwe sithuthela esigabeni "Ibha yamathuluzi okufinyelela ngokushesha". Iningi lewindi lithatha indawo yezilungiselelo eziningi. Engxenyeni yesobunxele yilawo mathuluzi angabezwa kwipaneli yokufinyelela esheshayo, futhi ngakwesokudla - labo asevele bekhona.

    Ensimini "Khetha amaqembu avela" setha inani "Amaqembu awasekho etafuleni". Okulandelayo, kusukela ohlwini lwemilayezo ehlelwe ku-alfabhethi, sithola futhi sikhethe isikhundla "Ifomu ...". Bese uchofoza inkinobho "Engeza".

  3. Emva kwalokho, ithuluzi esiyidingayo lizovela ngakwesokudla kwewindi. Sicindezela inkinobho "Kulungile".
  4. Manje leli thuluzi lisefenjini le-Excel kwibha yamathuluzi okufinyelela okusheshayo, futhi singayisebenzisa. Uzoba khona lapho kunikezwa incwadi yokusebenzela yile nqubo ye-Excel.
  5. Manje, ukuze ithuluzi liqonde lokho okudingeka ligcwalise, kufanele uhlele i-header ithebula bese ubhala noma yiliphi inani kuyo. Vumela uhlu lwetafula esinalo luzoqukatha amakholomu amane, anamagama "Igama lomkhiqizo", "Isibalo", "Intengo" futhi "Inani". Faka lawa magama kuhlu lobubanzi olungapheli lweshidi.
  6. Futhi, ukuze uhlelo luqonde ukuthi yiziphi izigaba ezithile ezizodinga ukusebenza ngazo, kufanele ufake noma yiliphi inani emgqeni wokuqala wethebula letafula.
  7. Ngemuva kwalokho, khetha noma yiliphi iseli lithebula elingenalutho futhi uchofoze kwisithonjana kuphaneli yokufinyelela okusheshayo "Ifomu ..."esasiyisebenzise ngaphambilini.
  8. Ngakho, ifasitela yethuluzi elicacisiwe livula. Njengoba ungabona, le nto inemikhakha ehambelana namagama amakholomu etafula lethu. Kulesi simo, insimu yokuqala isivele igcwele inani, ngoba sifike ngesandla ngeshidi.
  9. Faka amanani esiwabheka okudingekile emasimini asele, bese uchofoza inkinobho "Engeza".
  10. Emva kwalokho, njengoba sibona, amanani angenisiwe ahanjiswe ngokuzenzakalelayo emgqeni wokuqala wetafula, futhi ifomu laya ebhodini elilandelayo lezinsimu, ezihambisana nomugqa wesibili wethebula letafula.
  11. Gcwalisa iwindi lamathuluzi ngamanani esiwafunayo emgqeni wesibili we-tablepace, bese uchofoza inkinobho futhi. "Engeza".
  12. Njengoba ubona, amanani wesigcawu sesibili nawo ahlanganisiwe, futhi asizange sadinge ukuhlela kabusha isikhombisi etafuleni ngokwawo.
  13. Ngakho-ke, sigcwalisa uhlu lwetafula nazo zonke izindinganiso esifuna ukungena kuzo.
  14. Ngaphezu kwalokho, uma ufisa, ungakwazi ukuhamba ngokusebenzisa amanani angenisiwe ngaphambili usebenzisa izinkinobho "Emuva" futhi "Okulandelayo" noma i-scrollbar eqondile.
  15. Uma kunesidingo, ungalungisa noma yikuphi ukubaluleka kokuhlelwa kwetafula ngokuguqula kwifomu. Ukuze izinguquko zivele eshadini, ngemuva kokuzenza zibe yibhulogi elifanele, chofoza inkinobho "Engeza".
  16. Njengoba ubona, ushintsho lwavele lwafika ngokushesha ku-tablespace.
  17. Uma sidinga ukususa enye umugqa, bese usebenzisa izinkinobho zokuhamba noma ukupheqa ibha, siyaqhubeka ne-block ehambisanayo yamasimu efomu. Emva kwalokho chofoza inkinobho "Susa" efasiteleni lesithuluzi.
  18. Ibhokisi lengxoxo yexwayiso livela, ebonisa ukuthi umugqa uzosuswa. Uma uqiniseka ezenzweni zakho, bese uchofoza inkinobho "Kulungile".
  19. Njengoba ungabona, umugqa ususelwe ebangeni lesithebula. Emva kokugcwaliswa nokuhlela sekuphelile, ungaphuma efasiteleni lesithuluzi ngokuchofoza inkinobho. "Vala".
  20. Ngemuva kwalokho, ukuze wenze itafula lihlanganise okubonakalayo okuningi, ungayifometha.

Indlela 2: Dala ifomu lesifiso

Ukwengeza, usebenzisa i-macro namanye amathuluzi, kungenzeka ukudala ifomu lakho lomkhuba ukugcwalisa indawo yokubeka ithebula. Izokwenziwa ngokuqondile kushidi, futhi limelele ububanzi balo. Ngalesi thuluzi, umsebenzisi ngokwakhe uzokwazi ukubona izici azibheka ezidingekayo. Ngokuphathelene nokusebenza, cishe ngeke ibe ngaphansi kwe-analogue eyakhelwe ngaphakathi kwe-Excel, futhi ngezindlela ezithile, mhlawumbe, uyidlula. Ukubuyiselwa okuwukuphela kwendlela yohlu ngalinye lamatafula, kuzodingeka udale ifomu elihlukile, futhi ungasebenzisi isifanekiso esifanayo lapho usebenzisa inguqulo evamile.

  1. Njengendlela yangaphambilini, okokuqala, udinga ukwenza isihloko setafula elizayo kushidi. Izoba namaseli amahlanu anamagama: "P / p inombolo", "Igama lomkhiqizo", "Isibalo", "Intengo", "Inani".
  2. Okulandelayo udinga ukwenza ithebula okuthiwa "ihlakaniphile" kusuka etafuleni lethu, enekhono lokungeza imigqa ngokuzenzekelayo lapho ugcwalisa izigaba ezizungezile noma amaseli anedatha. Ukuze wenze lokhu, khetha i-header futhi, ekubeni kuthebhu "Ikhaya"cindezela inkinobho "Fometha njengetafula" ebhodini lamathuluzi "Izitayela". Emva kwalokho uhlu lwezindlela ezitholakalayo luvulwa. Ukukhetha komunye wabo ngeke kuthinte ukusebenza nganoma iyiphi indlela, ngakho-ke sikhetha nje ukhetho esibheka ukuthi lufanele kakhulu.
  3. Khona-ke iwindi elincane lokufometha itafula livuleka. Ibonisa ububanzi esasibuke ngaphambilini, okungukuthi, ububanzi bekhanda. Njengomthetho, le nsimu igcwele kahle. Kodwa kufanele sihlole ibhokisi eliseduze "Ithebula ngezihloko". Emva kwalokho, chofoza inkinobho "Kulungile".
  4. Ngakho, ububanzi bethu bufomatiwe njengetafula ehlakaniphile, ngisho nokuboniswa ngushintsho ekubonisweni okubukwayo. Njengoba ubona, phakathi kwezinye izinto, ukuhlunga izimpawu kubonakala eduze kwesihloko ngasinye sokubeka ikholomu. Kufanele kukhutshaziwe. Ukuze wenze lokhu, khetha noma iyiphi iseli "kuthebhu" ehlakaniphile bese uya kuthebhu "Idatha". Kule tape ku-block of amathuluzi "Hlunga futhi uhlunge" chofoza kusithonjana "Hlunga".

    Kunenye indlela yokukhubaza isihlungi. Awudingi ngisho nokushintshela kwelinye ithebhu, ngenkathi uhlala kuthebhu "Ikhaya". Ngemuva kokukhetha iseli le-tablespace ku-ribbon ku-block settings Ukuhlela chofoza kusithonjana "Hlunga futhi uhlunge". Ohlu oluvela, khetha isikhundla "Hlunga".

  5. Njengoba ubona, ngemuva kwalesi senzo, izimpawu zokuhlunga zanyamalala kusukela etafuleni, njengoba kudingeka.
  6. Khona-ke kufanele senze ifomu lokufaka idatha ngokwayo. Kuzoba uhlobo lwezintambo ezihlanganisa amakholomu amabili. Amagama omugqa wale nto azohambisana namagama ekholomu wetafula eliyinhloko. Okuhlukile yikholomu "P / p inombolo" futhi "Inani". Ngeke abe khona. Ukubalwa kweyokuqala kuzokwenzeka ngokusebenzisa i-macro, futhi ukubalwa kwamanani okwesibini kuzokwenziwa ngokusebenzisa ifomula yokwandisa inani ngamanani.

    Ikholomu yesibili yento yokufaka idatha ishiywe ingenalutho manje. Ngokuqondile, izindinganiso zokugcwalisa emigqeni yobubanzi obubanzi bethebula zizofakwa kamuva.

  7. Emva kwalokho sidala elinye ithebula elincane. Izoba nekholomu eyodwa futhi izoqukatha uhlu lwemikhiqizo esizoyiveza kukholomu yesibili yethebula eliyinhloko. Ukuze kucaciswe, iseli elinesihloko salolu hlu ("Uhlu lwezimpahla") ungagcwalisa ngombala.
  8. Bese ukhetha iseli lokuqala elingenalutho lezinto zokufakelwa kwexabiso. Iya kuthebhu "Idatha". Chofoza kusithonjana "Ukuqinisekiswa kwedatha"okuyinto efakwe kwi-tape ebhodini lamathuluzi "Ukusebenza nedatha".
  9. Iwindi yokuqinisekisa yokufaka iqala. Chofoza kumkhakha "Uhlobo Lwedatha"lapho okulungiselelwe okuzenzakalelayo khona "Noma yiliphi inani".
  10. Kusuka kokukhethwa okuvulekile, khetha isikhundla "Bhala".
  11. Njengoba ubona, emva kwalokhu, i-value yokuhlola isindo liguqule ukucushwa kwalo ngandlela-thile. Kunenkambu eyengeziwe "Umthombo". Sichofoza esithombeni ngakwesokunene sayo inkinobho yegundane lesokunxele.
  12. Khona-ke iwindi lokuhlola isamba lokufakwayo liyanciphisa. Khetha isikhombisi ngenkinobho yegundane lesokunxele ephethe uhlu lwemininingwane efakwe eshidi endaweni yetafula eyengeziwe. "Uhlu lwezimpahla". Ngemuva kwalokho, chofoza futhi kwisithonjana ngakwesokudla kwensimu lapho ikheli lebanga elikhethiwe livele khona.
  13. Ibuyisa ebhokisini lokuhlola lamanani wokufaka. Njengoba ubona, izixhumanisi zebanga elikhethiwe kulo zivele zikhonjisiwe ensimini "Umthombo". Chofoza inkinobho "Kulungile" phansi kwefasitela.
  14. Manje isithonjana esimweni sesxantathu sibonakala ngakwesokudla kweseli elingenalutho lento yokufaka idatha. Uma uchofoza kuso, uhlu oludonsa phansi luvuleka, oluqukethe amagama aphuma phezulu etafuleni. "Uhlu lwezimpahla". Idatha engaqondakali esitokisini ecacisiwe manje ayinakwenzeka ukungena, kodwa ungakhetha kuphela isikhundla esifisa ohlwini olunikeziwe. Khetha into ohlwini lokudonsa phansi.
  15. Njengoba ubona, isikhundla esikhethiwe siboniswa masinyane ensimini "Igama lomkhiqizo".
  16. Okulandelayo, kuzodingeka ukwabela amagama amaseli amathathu efomu lokufaka, lapho sizofaka khona idatha. Khetha iseli lokuqala lapho igama selivele selihlelwe khona. "Amazambane". Okulandelayo, iya ezinkambeni zamagama endle. Itholakala ngakwesokunxele kwewindi ye-Excel ezingeni elifanayo nebha yefomula. Faka lapho igama elingavumelani. Lokhu kungaba yiliphi igama ngesiLatini, lapho kungekho khona izikhala, kodwa kungcono ukusebenzisa amagama eduze nemisebenzi exazululwe yilesi sici. Ngakho-ke, iseli lokuqala lapho igama lomkhiqizo liqukethwe khona "Igama". Sibhala leli gama ensimini bese ucindezela ukhiye Ngena kwikhibhodi.
  17. Ngendlela efanayo, nikeza iseli lapho singena khona ubungakanani bomkhiqizo, igama "I-Volum".
  18. Futhi iseli lentengo liyi "Intengo".
  19. Ngemuva kwalokho, ngendlela efanayo, sinika igama kulo lonke uhla lwamaseli amathathu angenhla. Okokuqala, khetha, bese umnika igama ensimini ekhethekile. Masibe igama "Ukudabuka".
  20. Ngemuva kwesenzo sokugcina, kumele sigcine idokhumenti ukuze amagama esiwabelayo angabone ukuthi yikuphi okudaliwe esikhathini esizayo. Ukuze ulondoloze, iya kuthebhu "Ifayela" bese uchofoza into "Londoloza njengo ...".
  21. Ewindini elondoloziwe elondolozayo ensimini "Uhlobo lwefayela" khetha inani "I-Excel Workbook ye-Macro-Inikwe amandla (.xlsm)". Okulandelayo, chofoza inkinobho "Gcina".
  22. Khona-ke kufanele usebenze ama-macros kunguqulo yakho ye-Excel futhi unike amandla ithebhu "Unjiniyela"uma ungakenzi okwamanje. Iqiniso liwukuthi kokubili le misebenzi ikhutshaziwe ngokuzenzakalelayo ohlelweni, futhi ukuvuselelwa kwayo kufanele kwenziwe ngenkani efasiteleni lezilungiselelo ze-Excel.
  23. Uma usuwenzile lokhu, iya kuthebhu "Unjiniyela". Chofoza kusithonjana esikhulu "Visual Basic"okuyinto itholakala ku-tape ebhodini lamathuluzi "Ikhodi".
  24. Isenzo sokugcina senza umhleli we-VBA macro uqale. Endaweni "Iprojekthi"okuyinto engxenyeni engaphezulu kwesokunxele kwewindi, khetha igama leshidi lapho amatafula ethu atholakala khona. Kulokhu kunjalo "Ishidi 1".
  25. Emva kwalokho iya kwesokunxele ngezansi kwewindi ebizwa ngokuthi "Izakhiwo". Nazi izilungiselelo zeshidi elikhethiwe. Ensimini "(Igama)" kufanele esikhundleni segama lesiCyrillic ("Ishidi1") egameni elibhalwe ngesiLatini. Igama linganikezwa kunoma ubani okulula kakhulu kuwe, into esemqoka ukuthi iqukethe izinhlamvu zesiLatini kuphela noma izinombolo futhi azikho ezinye izimpawu noma izikhala. I-macro izosebenza ngaleli gama. Vumela kithi ukuthi leli gama lizoba "Umkhiqizo", nakuba ungakhetha noma yikuphi okuhlangabezana nezimo ezichazwe ngenhla.

    Ensimini "Igama" Ungaphinda ususe igama ngokunye okulula kakhulu. Kodwa akudingekile. Kulesi simo, ukusetshenziswa kwezikhala, i-Cyrillic nezinye izibonakaliso kuvunyelwe. Ngokungafani nepharamitha yangaphambilini, ecacisa igama leshidi lohlelo, le parameter inikezela igama kushidi elibonakala kumsebenzisi ku-bar yokushothi.

    Njengoba ungabona, emva kwalokho igama lizoshintsha ngokuzenzakalelayo. Ishidi 1 endaweni "Iprojekthi", kulowo esisanda kubeka kuzilungiselelo.

  26. Bese uye endaweni ephakathi kwewindi. Yilapho sidinga ukubhala ikhodi macro ngokwayo. Uma inkambu yomhleli wekhodi emhlophe endaweni ecacisiwe ingaboniswa, njengathi, bese uchofoza ukhiye womsebenzi. F7 futhi izovela.
  27. Manje ngesibonelo sethu, kudingeka sibhale ikhodi elandelayo ensimini:


    I-Sub DataEntryForm ()
    Sondeza ngakwesokuneneKunjenge-Long
    okulandelayoRow = Producty.Cells (Producty.Rows.Count, 2) .Ngoku (xlUp) .Ukusetha (1, 0).
    Nge-Producty
    Uma .Range ("A2"). Inani = "" Futhi .Range ("B2"). Inani = "" Khona-ke
    okulandelayoOkulandelayo = okulandelayoKu-1
    Qeda uma
    I-Producty.Range ("Igama"). Kopisha
    .Izicelo (ngokulandelayoBuka, 2) .PastePeal Paste: = xlPasteValues
    .Izicelo (ngokulandelayoKukhona, 3) .Value = Producty.Range ("Volum")
    .Izicelo (ezilandelayoKungeza, 4) .Value = Producty.Range ("Intengo")
    .Izicelo (ngokulandelayoKungenjalo, 5) .Value = Producty.Range ("Volum"). Inani * Producty.Range ("Inani").
    ("A2"). Ifomu = "= IF (ISBLANK (B2)," "", COUNTA ($ B $ 2: B2)) "
    Uma ulandelaUkulandelayo> 2 Khona-ke
    Ibanga ("A2"). Khetha
    Ukukhethwa.I-DestinationFill Destination: = Ubude ("A2: A" & NextRow)
    Uhlobo ("A2: A" & NextRow) .Selethe
    Qeda uma
    .Range ("Ukungahlehlisi")
    Qedela
    Qedela ngaphansi

    Kodwa le khodi ayiyona indawo yonke, okungukuthi, ihlala ihambelana kuphela necala lethu. Uma ufuna ukuzivumelanisa nezidingo zakho, kufanele ukuthi ushintshwe ngokufanele. Ukuze ukwazi ukukwenza ngokwakho, ake sihlaziye ukuthi leli khodi liqukethe, yini okufanele ishintshe kuyo, nokuthi yini engafanele ishintshwe.

    Ngakho, umugqa wokuqala:

    I-Sub DataEntryForm ()

    "DataEntryForm" igama le-macro ngokwayo. Ungayishiya njengoba kunjalo, noma ungayifaka esikhundleni sayo nanoma iyiphi enye evumelana nemithetho ejwayelekile yokudala amagama ama-macro (ayikho izikhala, sebenzisa kuphela izinhlamvu zezinhlamvu zesiLatini, njll). Ukushintsha igama akuthinti lutho.

    Nomaphi lapho igama litholakala khona kukhodi "Umkhiqizo" kufanele ubeke esikhundleni salo negama owawunikeze ngaphambilini ishidi lakho ensimini "(Igama)" izindawo "Izakhiwo" umhleli we-macro. Ngokuvamile, lokhu kufanele kwenziwe kuphela uma ubiza leli shidi ngokuhlukile.

    Manje cabanga ngomugqa olandelayo:

    okulandelayoRow = Producty.Cells (Producty.Rows.Count, 2) .Ngoku (xlUp) .Ukusetha (1, 0).

    I-Digit "2" kulo mzila kusho ikholomu yesibili leshidi. Kulokholomu ukuthi ikholomu ikhona "Igama lomkhiqizo". Ngokusho kwalo sizobala inani lemigqa. Ngakho-ke, uma kuleso simo ikholomu efanayo ine-oda ehlukile ye-akhawunti, kuzomele udinge inombolo ehambelanayo. Okushoyo "Qedela (xlUp) .Ifayili (1, 0) .Indlela" noma kunjalo, shiya ungashintshi.

    Okulandelayo, cabanga ngomugqa

    Uma .Range ("A2"). Inani = "" Futhi .Range ("B2"). Inani = "" Khona-ke

    "A2" - Lezi yizixhumanisi zeselula yokuqala lapho kukhonjiswa khona umugqa wokubala. "B2" - lezi yizixhumanisi zeselula yokuqala, ezosetshenziselwa ukukhipha idatha ("Igama lomkhiqizo"). Uma zihlukile, faka idatha yakho esikhundleni salezi zixhumanisi.

    Iya emgqeni

    I-Producty.Range ("Igama"). Kopisha

    Kupharamitha yakhe "Igama" kusho igama esilinikeze ensimini "Igama lomkhiqizo" kwifomu lokufaka.

    Ngemizila


    .Izicelo (ngokulandelayoBuka, 2) .PastePeal Paste: = xlPasteValues
    .Izicelo (ngokulandelayoKukhona, 3) .Value = Producty.Range ("Volum")
    .Izicelo (ezilandelayoKungeza, 4) .Value = Producty.Range ("Intengo")
    .Izicelo (ngokulandelayoKungenjalo, 5) .Value = Producty.Range ("Volum"). Inani * Producty.Range ("Inani").

    amagama "I-Volum" futhi "Intengo" kusho amagama esabelwe emasimini "Isibalo" futhi "Intengo" kufomu lokufaka elifanayo.

    Emigqeni efanayo esiyibonise ngenhla, izinombolo "2", "3", "4", "5" kusho izinombolo zekholomu efayeleni le-Excel elihambisana namakholomu "Igama lomkhiqizo", "Isibalo", "Intengo" futhi "Inani". Ngakho-ke, uma kuleso simo ithebula liguquliwe, khona-ke udinga ukucacisa izinombolo zekholomu ezihambelanayo. Uma kukhona amakholomu amaningi, ke ngokufanisa udinga ukwengeza imigqa yayo ikhodi, uma ingaphansi, bese ususa okungeziwe.

    Umugqa wandisa inani lempahla ngentengo yabo:

    .Izicelo (ngokulandelayoKungenjalo, 5) .Value = Producty.Range ("Volum"). Inani * Producty.Range ("Inani").

    Umphumela, njengoba sibona ku-syntax yerekhodi, izoboniswa kukholomu yesihlanu kwephepha le-Excel.

    Kule nkulumo, imigqa ibalwa ngokuzenzakalelayo:


    Uma ulandelaUkulandelayo> 2 Khona-ke
    Ibanga ("A2"). Khetha
    Ukukhethwa.I-DestinationFill Destination: = Ubude ("A2: A" & NextRow)
    Uhlobo ("A2: A" & NextRow) .Selethe
    Qeda uma

    Wonke amanani "A2" kusho ikheli leseli lokuqala lapho ukubalwa kwenombolo kuzokwenziwa, futhi izixhumanisi "A " - ikheli lenye ikholomu enezinombolo. Hlola ukuthi ukubala kuzovela kuphi etafuleni lakho bese ushintshe izixhumanisi kukhodi, uma kunesidingo.

    Umzila uhlunga ububanzi befomu lokungena kwedatha ngemuva kokuthi ulwazi oluvela kulo ludluliselwe etafuleni:

    .Range ("Ukungahlehlisi")

    Akunzima ukuqagela ukuthi ("Ukudabuka") lisho igama lobubanzi esasike sabela ngaphambilini emasimini wokungena kwedatha. Uma ubapha igama elihlukile, kufanele lifakwe kulolu gqa.

    Yonke ikhodi iyonke futhi kuzo zonke izimo izokwenziwa ngaphandle kokushintsha.

    Ngemuva kokuba ubhale ikhodi ye-macro efasiteleni lomhleli, kufanele uchofoze kusindise njengesithonjana sediski ngakwesokunxele kwewindi. Khona-ke ungawavala ngokuchofoza inkinobho ejwayelekile yokuvala amawindi ekhoneni elingenhla elingakwesokudla.

  28. Ngemuva kwalokho, buyela emuva ku-Excel sheet. Manje sidinga ukubeka inkinobho ezokwenza kusebenze i-macro edalwe. Ukuze wenze lokhu, iya kuthebhu "Unjiniyela". Ebhokisini lesethingi "Ukulawula" kwi-tape chofoza inkinobho Namathisela. Uhla lwamathuluzi luvula. Eqoqweni lamathuluzi Ama-Form Controls khetha okokuqala - "Inkinobho".
  29. Khona-ke inkinobho yegundane lesokunxele ebanjwe phansi, sizungeza indawo lapho sifuna ukubeka khona inkinobho yokuqalisa enkulu, okuzodlulisa idatha kusuka kwifomu kuya etafuleni.
  30. Ngemuva kokuthi indawo ijikelezwe, khulula inkinobho yegundane. Khona-ke ifasitela yokunikezela i-macro into into iqala ngokuzenzakalelayo. Uma ama-macros amaningana asetshenzisiwe encwadini yakho, bese ukhetha ohlwini lolo ludala ngaphezulu. Sikubiza "DataEntryForm". Kodwa kulokhu, i-macro ingenye, ngakho-ke khetha nje bese uchofoza inkinobho "Kulungile" phansi kwefasitela.
  31. Ngemuva kwalokho, ungaqamba kabusha inkinobho njengoba uthanda, ngokukhetha igama layo lamanje.

    Esikhathini sethu, isibonelo, kungaba kuhle ukumbamba igama "Engeza". Qamba kabusha futhi uchofoze ngegundane kunoma iyiphi iseli yamahhala yeshidi.

  32. Ngakho, ifomu lethu lilungele ngokuphelele. Hlola ukuthi kusebenza kanjani. Faka amanani adingekayo ezindaweni zawo bese uchofoza inkinobho. "Engeza".
  33. Njengoba ubona, amanani adluliselwa etafuleni, umugqa unikezwa ngokuzenzakalelayo inombolo, inani libalwe, amasimu wefomu asuliwe.
  34. Qedela kabusha ifomu bese uchofoza inkinobho. "Engeza".
  35. Njengoba ubona, umugqa wesibili wengezwe etafuleni. Lokhu kusho ukuthi ithuluzi lisebenza.

Bheka futhi:
Indlela yokudala i-macro ku-Excel
Indlela yokudala inkinobho ku-Excel

Ku-Excel, kunezindlela ezimbili zokusebenzisa idatha yokugcwalisa ifomu: eyakhelwe ngaphakathi nomsebenzisi. Ukusetshenziswa kwenguqulo eyakhelwe ngaphakathi kudinga ubuncane bomzamo kusuka kumsebenzisi. Ingahlala iqale ngokufaka isithonjana esifanayo kubha yamathuluzi okufinyelela okusheshayo. Udinga ukwakha ifomu lesifiso wena, kodwa uma ufunde kahle ngekhodi ye-VBA, ungenza le thuluzi libe yinkimbinkimbi futhi ifanele izidingo zakho ngangokunokwenzeka.