Shaxda tusmada
Waxaan ku tusi doonaa 3 hababka Excel VBA ilaa dooro kala duwan laga bilaabo unugga firfircoon >. Si tan loo muujiyo, waxaanu soo qaadanay xog-ururin leh 3 tiir : “ Magaca koowaad ”, “ Magaca dambe ”, iyo “ Email ”. Waxaan dooran doonaa unug anagoo adeegsanayna Excel VBA waxaan dooran doonaa inta udhaxeysa unug .
>>>Soo deji Buug-shaqeedka Tababarka
> >>>Ka dooro Range ka soo jeeda Cell Active 9> 1. Shaqaalaysiinta VBA si ay u doortaan Range laga bilaabo Unugga Firfircoon ilaa Unugyada Ugu Dambeeysa ee Aan Banaan MadhanHabka ugu horreeya, waxaan isticmaaleynaa Range.Endhantida.<3 ’Halkan, waxaanu koodkayaga galin doonaa koodka Module code-keena. Si aad u soo qaadatid Moduledaaqadda, samee kuwan-Tallaabooyinka:
- Marka hore, laga bilaabo Developer tab >>> dooro Visual Basic . >Visual Basic .
Daaqadda Visual Basic ayaa soo bixi doonta.
> 11>Tani waxa ay keenaysaa daaqada Module
>>>1.1. Adigoo isticmaalaya End(xlUp) Property
>Qaybtan, waxaanu dooran doonaa kala duwan> korilaa ugu dambeeya unug aan banaanaynlaga bilaabo unugga firfircoon.>Tallaabooyinka:
- Marka hore, ka soo qaad daaqadda Module .
- Marka labaad, qor koodka soo socda Sub >Habka ToUp . Markaa waxaanu dooranaynaa kala duwanaanshahayaga . Qiimaha kowaad waa unugkeena firfircoon . Qiimaha ugu dambeeya waa ActiveCell.End(xlUp) . Ugu dambeyntii, waxaan dooraneynaa kala duwanaanshaha oo leh Range . Dooro habka. > > >
- >
- Marka sadexaad, Save oo xidh daaqada >kadib dooro cell C6 . Kani unug waa firfircoon >unug .
>
> >
Intaas ka dib, Macro > sanduuqa wada-hadalka ayaa soo bixi doona.
- Markaa, ka dooro “ ToUp ” ka “ Macro name: ”
- Ugu dambaynta, guji Run >.
>
Waanu arki karnaa taas, waxaanu doortay tirada unugyada C4:C6 .<3
>
Wax dheeraad ah ka akhri: Excel VBA: Nuqulka Range Dynamic ilaa Buug-hawleed kale >>
1.2. Isku darka Dhamaadka(xlDown) Property
>Qaybtan, waxaanu ka dooran doonaa kala duwanaanshaha >hoos ka unugga firfircoon .>Tallaabooyinka: >
>>6581
Waxa aanu wacnay Sub >Habkayaga Down . Markaa waxaanu dooranaynaa kala duwanaanshahayaga . Qiimaha kowaad waa unugkeena firfircoon . Qiimaha ugu dambeeya waa ActiveCell.Dhammaadka(xlDown) . Ugu dambeyntii, waxaan nahayxulashada kala duwanaanshaha oo leh Range . Dooro habka.
> >>- >
- Marka saddexaad, > Kaydi oo xidh daaqada
- Intaa ka dib, dooro cell C6 . Kani waa unugayada firfircoon . >
>
- >
- Markaa, soo qaado Saduuqa wada-hadalka Macro .<13
- Dooro “ Hoos udhac ”. >Ugu dambayntii, dhagsii Run .
Sidaas darteed, waxaan ka dooranay kala duwan ka unuggayada firfircoon annagoo adeegsanayna Excel VBA .
>>Wax dheeraad ah ka akhri: Excel VBA si ay u dhex marto Range ilaa unug madhan (4 tusaale)>> Qodobo la mid ah>
- >
- Excel VBA: Loop dhexda Tiirarka Range (5 Tusaalayaal)
- > Sida loogu Isticmaalo VBA Saf kasta oo gudaha Excel ah 13>
- Excel Macro: Kala saar Tiirar badan oo leh Range firfircooni leh (4 Hababka)
- > VBA si ay u dhex marto safafka iyo tiirarka ee Range gudaha Excel (5 Tusaalayaal) >
- > Sida loogu beddelo Range to Array gudaha Excel VBA (3 Ways) > 13>
Tallaabooyinka: >
>- >Marka hore, soo qaad daaqadda Module . >Marka labaad, ku qor koodka soo socda. >
9800
Waxa aanu wacaynaa Sub >Habkayaga > Toleft . Markaa waxaanu dooranaynaa kala duwanaanshahayaga . Qiimaha kowaad waa unugkeena firfircoon . Qiimaha ugu dambeeya waa ActiveCell.Dhammaadka (xlToLeft) . Ugu dambeyntii, waxaan dooraneynaa kala duwanaanshaha oo leh Range . Dooro habka.
> > >- Marka saddexaad, Keydi oo xidh daaqadda
- Intaas ka dib, dooro cell D7 . Kani waa unugayada firfircoon . >
>
- >
- Markaa, soo qaado Macro-sanduuqa wada-hadalka .<13
- Dooro “ To Bidix ”. >Ugu dambayntii, dhagsii Run .
>
1.4. Hirgelinta Dhamaadka(xlToRight) hantida
Qaybtan, waxaanu dooran doonaa kala duwanaanshaha ilaa midig ee unugga firfircoon .
Tallaabooyinka: >
>- >Marka hore, soo qaad daaqadda Module . >Marka labaad, ku qor koodka soo socda. >
4799
Waxa aanu wacaynaa Habka-hoosaadka >Toosta . Markaa waxaanu dooranaynaa kala duwanaanshahayaga . Qiimaha kowaad waa unugkeena firfircoon . Qiimaha ugu dambeeya waa ActiveCell.End(xlToRight) . Ugu dambayntii, waxaanu dooranaynaa kala duwanaanshaha oo leh Range . Dooro habka.
> > >- Marka saddexaad, Keydi oo xidh daaqadda
- Intaas ka dib, dooro cell C8 . Kani waa unugayada firfircoon . >
- >
- Markaa, soo qaado Saduuqa wada-hadalka Macro .<13
- Dooro “ Tooqda ”. >Ugu dambayntii, dhagsii Run .
Sidaas darteed, waxaan dooranay a kala duwanaanshaha laga bilaabo unugayada firfircoon addoo isticmaalaya Excel VBA .
> > > 2. Isticmaalka VBA Range. Isticmaalka VBA gudaha ExcelHabka labaad, waxaan u isticmaali doonaa VBA Range.Offset hantida si aan u doorano kala duwan annaga oo adeegsanayna unugga firfircoon .
Tallaabooyin: >
>>7420
Waxaan abuurnay Nidaam hoosaadkayaga IsticmaalkaOffset . Markaa waxaanu dooranaynaa kala duwanaanshahayaga . Qiimaha kowaad waa unugkeena firfircoon . Qiimaha ugu dambeeya waa ActiveCell.Offset > (1,2) . Iyadoo Hantida ka-baxsan waxaynu guuraynaa 1 saf hoos iyo 2 tiirar > midig . Ugu dambeyntii, waxaan dooraneynaa kala duwanaanshaha oo leh Range . Dooro habka.
> >>>>>>>>>>> >>>
- >
- Markaa, soo qaado Saduuqa wada-hadalka Macro .<13
- Dooro “ IsticmaalkaOffset ”
- Ugu dambayntii, dhagsii Run .
>
Wax badan ka sii akhri: Excel VBA: Hel Range of Cells with Values (7) Tusaalooyinka) >
> 3. Ka dooro Range ka soo jeeda Unug Firfircoon Adigoo isticmaalaya VBA gudaha Excel adiga oo ka faa'iideysanaya Hantida Gobolka haddaHabka u dambeeya, waxaanu isticmaali doonaa Range.CurrentRegion hantida Marka hore, ku qor koodka soo socda gudaha Module daaqada. >
6650
Waxaanu wacnay Sub > Habkayaga cGobol . Markaa waxaanu dooranaynaa kala duwanaanshahayaga . Hantida Current Region , waxaanu dooranaynaa kala duwanaanshaha ilaa unug banaan . Ugu dambayntii, waxaanu dooranaynaa kala duwanaanshaha oo leh Range . Dooro habka.
> >>- Marka labaad, Save oo ku noqo xaashida Excel
- Intaas ka dib, dooro cell C10 . Kani waa unugayada firfircoon . >
- >
- Markaa, soo qaado Saduuqa wada-hadalka Macro .<13
- Dooro “ cGobolka ” >Ugu dambayntii, dhagsii Run .
Sidaa darteed, waxaanu dooranay kala duwanaanshaha ilaa unug madhan .
>>> Qaybta Tababarka>Waxaan ku siinay hab-ku-dhaqanka xogta hab kasta oo ku jira Excel faylka.
>
Gabagabo
>Waxaan waxaan ku tusay 3 hababka Excel VBA >dooro kala duwan laga bilaabo unug firfircoon . Haddii aad la kulanto wax dhibaato ah fahamka tillaabooyinka, xor u noqo inaad faallo ka bixiso hoos. Waad ku mahadsan tahay akhrinta, si aad u wanagsan!