Get access to the full Excel VBA course here 👉 www.xelplus.com/course/excel-vba-excel-macros/
@SolidSnake59
5 жыл бұрын
Hi, I have learned from Paul Kelly that assigning array is much simpler. You can just use such a code: dim arr as Variant arr = Range("A6").CurrentRegion And that's it!
@TheFoxwiz
4 жыл бұрын
That’s exactly what I was thinking
@quasipseudo1
4 жыл бұрын
You explain things well, instead of simply showing off your knowledge. Very good.
@stuartboyle5169
5 жыл бұрын
Leila Nice Job! You are the only video that pops up which is truly working with an Array and not confusing a list of cells for a declared Array.
@mrashid229
3 жыл бұрын
Thank you for the lesson. This teaches how to create 2D arrays. Once learnt, one may try this alternative mean for copying the data from sheet to array(dynamic ). This eliminates declaring some variables, using 2 nested loops and rewriting codes when number of company/manager increases. Dim Compinfo As Variant ' To be used as dynamic array Dim i as Integer ' Following code will create 2D array in Compinfo variable taking the values from range A6:B14 Compinfo = Sheet1.Range("A7").CurrentRegion.Value For i = 2 to UBound(Compinfo , 1) ' Compinfo(i, 1), Compinfo(i, 2) Next i
@LeilaGharani
3 жыл бұрын
Great tip!
@ExcelForFreelancers
6 жыл бұрын
Thanks for sharing your knowledge on arrays. Nice job Leila.
@petralabui9302
4 жыл бұрын
best youtube chanel for excel, simple, easy and right to the point
@LeilaGharani
4 жыл бұрын
😘
@sawkyawhtike
3 жыл бұрын
The best tutorial on array that I have ever seen. You are great.
@HerculesSantosLoyola
4 жыл бұрын
Amei sua aula, você explica muito bem. Tem poucas aulas em português sobre esse conteúdo. Obrigo pela ajuda.
@wynhopkins4023
6 жыл бұрын
Well explained on something that can be really tricky
@LeilaGharani
6 жыл бұрын
Thank you Wyn - nice to see you here :)
@abdulazizal-jasser7797
2 ай бұрын
You can copy the range to the array in one line instead of the loop: CompInfo = Range("A7:B14").Value. Before that you need to declare the array: Dim CompInfo As Variant
@jaredwhitener4385
4 жыл бұрын
Helpful video. I added code at the end of the line for adding a new sheet. "Set ShNew = NewBook.Worksheets.Add(after:=Sheets(Sheets.Count))" This forces the tabs/sheets to be in order. Top to bottom on the list becomes left to right in the sheet order. Also, a line at the end could be added, "Sheets(1).Delete", to get rid of the blank sheet (given you adopted my above code addition for order).
@pinkeishz9106
6 жыл бұрын
It was great example of 2 dimensional Array, which was quick well explained... 👌
@LeilaGharani
6 жыл бұрын
Thank you. Glad you find the explanation easy to follow :)
@ahrorkuldashev9603
4 жыл бұрын
Struggling to understand what kind person would give a dislike to this video.
@ckokse
6 жыл бұрын
Thanks for that! Great example and very well explained.
@muhammetsamkara1074
3 жыл бұрын
Great! VBA Queen
@ian_senior
6 жыл бұрын
thanks Leila, extremely helpful and easy to understand. You are a great Instructor and beautiful lady. :)
@excelisfun
6 жыл бұрын
Thanks for the array fun : )
@LeilaGharani
6 жыл бұрын
You're very welcome Mike.
@313rbd
4 жыл бұрын
Excellent teacher! I also take your courses on Udemy. Well done
@BillSzysz1
6 жыл бұрын
Thanks Leila for a very clear explanations of building and using arrays in VBA:-)) I know that this is VBA lesson but I would like to throw in my two cents here. This particular case we can do without VBA. I think, in 1 - 1.5 minute :-)) And it doesn't matter how many worksheets we need to add.
@LeilaGharani
6 жыл бұрын
:) Agree - I wouldn't ever think of writing this code if I had to do this once. if I had to repeat it every week on a larger set, then probably yes...
@BillSzysz1
6 жыл бұрын
Absolutely agree, Leila :-))
@sujalbalar316
4 жыл бұрын
Excellent lady
@ashishkumar-gd7dh
3 жыл бұрын
i love your videos
@RajaTRemyaR
5 жыл бұрын
Good one. You can use dictionary in VBA which is more useful than array
@soberingtimes2362
5 жыл бұрын
Excellent. Thank you very much :)
@jaaptijssen1225
4 жыл бұрын
Nice video with clear explanation. about creating Array! What exactly are the benefits of using an array.? This is also possible with a loop based on the cell values in Excel. (I am novice... :)) So hence the question, am a novice VBA so I am interested.
@abdullah_alhathloul_
2 жыл бұрын
Excellent
@FurryEskimo
2 жыл бұрын
I don’t suppose we could use strings to refer to data, rather than numbers for the bounds? I have an input which is a strong, and I want to use that as the variable being used to store data in the array. Eg. Input “species=dog”, array(species) = array(species) + 1
@krn14242
6 жыл бұрын
Thanks. Good example of Array
@mackidson1
5 жыл бұрын
OMG SHE'S GORGEOUS!!!
@ashoksahu9546
6 жыл бұрын
Very very nice video. Very well explained
@LeilaGharani
6 жыл бұрын
Thank you Ashok. Glad you find it easy to follow.
@mahmoudsabry1244
5 жыл бұрын
Thanks alot you guided me toi much
@grawzito
5 жыл бұрын
Excellent. Thank you !
@LeilaGharani
5 жыл бұрын
You're very welcome Paulo.
@manishagrawal417
6 жыл бұрын
Hi Leila, Your videos are great..really easy to understand and follow..Can you also make a video on how to communicate to microsoft sharepoint via VBA..I am looking for some basic tasks like - Download a file / folder from SP to local drive, Upload file to SP, check for existence of file in particular folder of SP, count the number of files in specific folder of SP, etc
@LeilaGharani
6 жыл бұрын
Thanks Manish - Glad you find the videos easy to follow. I added this to my list.
@poweroff9593
4 жыл бұрын
How can check if array array is empty or not because iam get error if ido like this and array not empty Dim arr as variant Arr = range ("A1"). Currentregion. Value If arr =empty then 🌹
@yeahnick4260
7 ай бұрын
Dim Arr as variant Arr = Range("A1").CurrentRegion.Value if IsArray(Arr) = True then ( ... ) Else ( ....) end if
@VBAbyMBA
4 жыл бұрын
I created first button and copy paste it to the Userform but it did not Prompt: "You already have a control Name XXX. Do you want to create a control array?" so my question is how do I create Control array of Command buttons. what are the steps to follow? Am I missing something? I am new to this Topic Please help
@matthewmoses6382
2 жыл бұрын
Hi Leila, thank you for all your wonderful videos. I am hoping you could help me. I am using vba to and an array to break up a large list of over 300 names I want my array to have a size of 64 names unless the last name in the array matches the 65th name.
@mohammadalmomani1193
5 жыл бұрын
Hello I am trying to find an vba code to copy and paste every range of rows like(A1:C19).copy and paste in word file as image then copy from (A20:C39) and paste in the same word file and so on for the rest of the table in excel. they have told me that I need to use the looping in excel but I don't know exactly how to do it …. please help if you can
@hosseinhosseinpoor4845
3 жыл бұрын
thanks.
@alvaromorales6828
4 жыл бұрын
People, don't use for loop, it's not fast. Just equal the range to some array and that's it.
@vijaysahal4556
4 жыл бұрын
superb ms L
@pabloalonso1001
5 жыл бұрын
Hi Leila! Thak you very much for sharing your knowledge on VBA with your superb posts and channel. In particular, I found this one as a great example of 2 dimensional Array. However, code creates worksheets in an inverse order, that is to say, the first one is the "Pes" worksheet, wich is the last one item of the list. I have been trying: For r = 8 To 1 Step -1, but VBA gives me an error. However the same idea works with an 1 dimesional Array. Please, How could I try to obtain worksheets in its order? Thanks a lot...
@robertbateman3665
5 жыл бұрын
Pablo Alonso: Try using ...Worksheets.Add(After:=Sheets(Sheets.Count)). This will add the new sheet to the end of the sheet tabs. Note: You'll still have "Sheet1" in the new book. You might want to write something to find if Sheet1 exists & if so, delete it. Have a great day!
@Strobinski
6 жыл бұрын
CompInfo = Range("A7:B14") works as well to populate the array directly (?)
@LeilaGharani
6 жыл бұрын
Thank you for your comment :) Yes - we cover variant arrays separately in the course. The aim here is to be able to visualize a two dimensional array. I find that's easiest to do when referencing rows and columns....
@alexrosen8762
6 жыл бұрын
Sooo useful! Thanks Leila :-)
@LeilaGharani
6 жыл бұрын
You're very welcome Alex :)
@rrrprogram8667
6 жыл бұрын
Great video
@LeilaGharani
6 жыл бұрын
Thank you. I'm glad you like it.
@stevennye5075
4 жыл бұрын
well done
@edihardinal5940
4 жыл бұрын
It's great explanation. I love u Laila.
@prakashsrinivasan7840
2 жыл бұрын
Nice
@ismailismaili0071
6 жыл бұрын
thank you so much Ms. Leila kindly please let me know how to use barcode for the same product and make the qty bar add one as much as you scan the same product hope you understand what i mean. thanks again
@LeilaGharani
6 жыл бұрын
You're welcome Ismail. Not sure about your query though - best is to post your specific question with a sample file either here: www.mrexcel.com/forum or here: www.excelforum.com/ - you can post a link to your question here too and if I get a chance I can take a look, otherwise you will get answers from others...
@deveshkumar2736
6 жыл бұрын
Hi Leila your videos are really nice my question is that we can do this by loop having 2 variables one will store the company name and second manager and then we can run the loop.. I don't have any knowledge about Ubound and Lbound can you tell.me the difference please please
@LeilaGharani
6 жыл бұрын
Yes that will work too. Ubound is the upper limit of the array and Lbound is the lower limit. These are used to get the size of the array.
@Dubaiinit
4 жыл бұрын
Spending more time with Leila than with the Mrs.... 8-)
@LeilaGharani
4 жыл бұрын
Haha. I hope she'll understand :)
@mujeebuddinsarfaraz
5 жыл бұрын
Thank you
@johnborg6005
6 жыл бұрын
Thanks Leila :)
@LeilaGharani
6 жыл бұрын
You're very welcome John.
@bassisessaidexcel
5 жыл бұрын
Merci
@LeilaGharani
5 жыл бұрын
My pleasure.
@jafarmiya9213
5 жыл бұрын
Hi mam how can it make Dynamic?
@PrincePedia
6 жыл бұрын
Great
@bigsam1989
4 жыл бұрын
Please how can I convert a List of cells to an Array e.g A 1 by 9 to a 3 by 3 array arrangement, such that the Array is linked to the List Data? Something like this- 1 2 3 4 5 6 7 8 9 To 123 456 789
@Permaclok
3 жыл бұрын
i = 1 For j = 1 to 9 Arr(i,j) = cells(1,j) If(j / i > 3) then i=i+1 End if Next j
@sandeepkothari5000
6 жыл бұрын
WoW = Wonder Woman = Leila Gharani
@saileshmutreja9311
6 жыл бұрын
Aswm
@vijaysahal4556
4 жыл бұрын
👍👍👍👍👍👍👍
@kalpeshparkar9852
4 жыл бұрын
May I get your email id need a help in VBA application development
Пікірлер: 85