How To Master Arrays In Excel VBA + FREE MACROS & CHEAT SHEET

  Рет қаралды 10,117

Excel For Freelancers

Excel For Freelancers

Күн бұрын

Пікірлер: 58
@ExcelForFreelancers
@ExcelForFreelancers 23 күн бұрын
😱 𝗧𝗨𝗥𝗡 𝗖𝗢𝗠𝗣𝗟𝗘𝗫 𝗗𝗔𝗧𝗔 𝗜𝗡𝗧𝗢 𝗦𝗜𝗠𝗣𝗟𝗘 𝗦𝗢𝗟𝗨𝗧𝗜𝗢𝗡𝗦 𝗪𝗜𝗧𝗛 𝗔𝗜 ▶ www.excelforfreelancers.com/AiDataAnalystYTPinnedComment
@enrikekasijas705
@enrikekasijas705 10 ай бұрын
Arrays are the sickest and hardest elements 😂❤❤❤ can't wait!!!
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Great, thanks so much and I am happy to help and share
@Info-God
@Info-God 10 ай бұрын
Once you master Array you"ll need to learn Class for arrays (dynamic classes for arrays) , then Dictionary.
@SyedMuzammilMahasanShahi
@SyedMuzammilMahasanShahi 10 ай бұрын
Thank you so much Randy for this amazing video.
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
For sure, you are very welcome Syed and thanks so much for your continued support
@ashokanselliah9571
@ashokanselliah9571 10 ай бұрын
Thank you very much Randy Sir for the wonderful explanation on the arrays
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
For sure, you are very welcome and I am happy to help and share
@Info-God
@Info-God 10 ай бұрын
Arrays and loops are fundamental for advanced programming.
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Absolutely, one of my favorites. Thanks so much for sharing
@mansoormohammed8718
@mansoormohammed8718 9 ай бұрын
I subscribed and purchased one of your courses. You have a lot to give. You are an example of an individual who loves doing good and helping others. Congratulations on your wonderful soul
@ExcelForFreelancers
@ExcelForFreelancers 9 ай бұрын
Thank you so very much, I really appreciate that and I am really glad you enjoy the content and courses.
@akkintouch
@akkintouch 10 ай бұрын
Thanks Randy as always great content. Possible to explain the filter array in Patreon?
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Thanks so much. Yes its certainly possible. I checked it out and seemed a bit complicated for one of our Basic VBA tutorials but I will try to get it added into one of the more advanced lessons. Thanks for your continued support over the years.
@alializadeh8195
@alializadeh8195 10 ай бұрын
Thanks
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
For sure, you are very welcome
@designexperience
@designexperience 10 ай бұрын
Thank you Randy I'll try them...
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
For sure, you are very welcome and happy to help and share
@meka811
@meka811 10 ай бұрын
Thank for you Randy for this excellent Video, I enjoyed learning about arrays,, but I am about to ask a crazy question,,, what font do you use for your vba coding?
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Hi and thanks for your support. Its a nice question. I was not sure, so I had to look it up. its Arial (Western) Font Size 16. I hope this helps and thanks so much.
@andrewmatt7731
@andrewmatt7731 8 ай бұрын
In the 2DArray example, why are we able to omit the '()' parenthesis in the 'Dim TwoDArr as Variant' line? I am thinking it has something to do with the data type, 'Variant'.
@ExcelForFreelancers
@ExcelForFreelancers 8 ай бұрын
Yes that is correct, as a variant, its a much more flexible variable than the others. Strings, Long or other variables need to be specified. Thank you for your Likes, Shares & Comments. It really helps.
@enrikekasijas705
@enrikekasijas705 10 ай бұрын
Great introduction to Arrays!!!😂❤❤❤ Thank you ❤
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Thank you so very much, I really appreciate that and glad you enjoyed the training.
@pablomoreno2192
@pablomoreno2192 9 ай бұрын
Are you planning to do videos of applications that work with office scripts? There is a real need of using applications for excel for the web and also application that can be run by multiple users at the same time (vba workbooks that are used at the same time by multiple users can give errors), and office scripts is the tool to avoid these inconveniences
@ExcelForFreelancers
@ExcelForFreelancers 9 ай бұрын
Hi and thanks. I would love to for sure, however Office Scripts are nowhere near being ready for that. For example worksheet/workbook change events and selection events do not exist in scripts as of yet, so as soon as the power is up to the VBA level I will be creating videos for scripts aw well. I hope this helps and thanks so much.
@ExcelForFreelancers
@ExcelForFreelancers Ай бұрын
⚡ 𝗦𝗜𝗠𝗣𝗟𝗜𝗙𝗬 𝗖𝗢𝗠𝗣𝗟𝗘𝗫 𝗘𝗫𝗖𝗘𝗟 𝗧𝗔𝗦𝗞𝗦 𝗜𝗡𝗦𝗧𝗔𝗡𝗧𝗟𝗬 𝗪𝗜𝗧𝗛 𝗘𝗫𝗖𝗘𝗟 𝗔𝗜 𝗧𝗢𝗢𝗟𝗣𝗔𝗖𝗞 𝗔𝗗𝗗-𝗜𝗡 👉 www.excelforfreelancers.com/ai-toolpack
@vannhiem8021
@vannhiem8021 10 ай бұрын
Great! May you make a file for QA manager in a factory 🏭
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Hi and thanks so much. This would be a custom job since its very specific. If you would like some help with this, we have a group with 60,000 Excel experts who would love the opportunity to customize this for you. Please join our Excel For Freelancers Facebook Group here: bit.ly/groupexcel (if you have not done so yet) You can then create a post and mark it as a PAID JOB, along with all of the details and requirements. Our members can then contact you and decide on how to best move forward with your project. I hope this helps and thanks so much.
@andrewt207
@andrewt207 9 ай бұрын
Excellent run through. I need to have a play with Arrays in VBA ... familiar with them in C/Python so this should be interesting. One question (I'm probably being dim) - in Sub DynamicBoundsArray(), why is the RowNumb = 34? The array is length 30, first (Excel) row 4 and last 33 (so not a +1 because it is zero to ...) why isn't it 33 as this is the final row processed [RowNumb = 4 to 33]?
@ExcelForFreelancers
@ExcelForFreelancers 9 ай бұрын
HI and thanks, the item in an array is counted as 0 if its not specified so therefore the rows should always be 1 more than the array value. I hope this helps and thanks so much.
@henkvinck888
@henkvinck888 10 ай бұрын
amazing video THNX Randy
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Thank you so very much, I really appreciate that and glad you enjoyed the training
@ElectromecanicaIndustrial
@ElectromecanicaIndustrial 10 ай бұрын
Learning arrays to optimize my VBA code
@Info-God
@Info-God 10 ай бұрын
You must be very well organized from very begining to be able to use arrays. That's the trick.
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Great, thanks so much. I am happy to help and share
@SJGorilla
@SJGorilla 5 ай бұрын
Is t it faster to use a For Next loop rather than a For Each loop? 1:09
@ExcelForFreelancers
@ExcelForFreelancers 5 ай бұрын
I am not sure if its faster, however I prefer the For Next simply because of the clearly defined data set. I use for Each when I loop through objects such as Shapes, Worksheets or Workbooks. I hope this helps and thanks so much.
@Info-God
@Info-God 10 ай бұрын
Dictionaries are another type of arrays. Listarrays is another powerful type of arrays.
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Absolutely, thanks so much for sharing
@venkateshreddy992
@venkateshreddy992 9 ай бұрын
Hi sir. I have a problem in excel I have data that was downloaded from a software which is totally web based. In that excel all values are in text format including dates. If I give f2+enter that text will turn to proper date. But the problem is there are a lot of cells like in thousands. I tried converting to CSV. It works sometimes and sometimes it make the date to us format. Like 1/4/24 (1st April) will become 4th jan 24. Is there any VBA code that you can suggest to solve that issue
@ExcelForFreelancers
@ExcelForFreelancers 9 ай бұрын
Hi , Thanks for your comment. It would be difficult for us to help unless we see the specific bug you are running into. Can you upload screenshots of your bug and sheet into our Excel For Freelancers Facebook Group here: bit.ly/groupexcel We have 60,000 Members who would love to help you with this. Thanks so much.
@Info-God
@Info-God 10 ай бұрын
Once you master Array you"ll need to master Class for arrays (dynamic classes for arrays) , then Dictionary.
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Thanks so much for your continued support.
@kartickchakraborty9135
@kartickchakraborty9135 2 ай бұрын
Hi Randy, how are you? Your explanation is superb. No one can explain these topics so easily. Randy, recently I've come across a problem like this. Would you kindly make a video on this topic - "How to split Strings that contain no Delimiter using User Defined Function in Excel VBA?" For Example, - You have some client names on your Sheet1 from Range("A2") to Range("A16"): Raw Data: ======== Names First Names | Middle Names | Last Names ------------ -------------------- ------------------------ -------------------- AlexanderWilliamJamesBrown AmandaTaylor AriaNguyen AubreyFoster AveryAnnPhillips Beerus BenjaminThomasHarris CharlotteMitchell ChristopherJackson DanielJamesMiller DavidAndrewJohnWilliams Dende DylanJamesWard ElijahWatson EllaSophiaRoberts ========== Here, some clients have First Names, Middle Names and Last Names (For Example: Alexander William James Brown etc.); some have First Names and Last Names (For Example: Amanda Taylor etc.) and some have only First Names (For Example: Beerus etc.). Now, I want to delimitate each name based on the Capital Letter. Desired Output mentioned below: Desired Output: ============= Names First Names | Middle Names | Last Names ------------ -------------------- ------------------------ -------------------- AlexanderWilliamJamesBrown Alexander | William James | Brown AmandaTaylor Amanda | | Taylor AriaNguyen Aria | | Nguyen AubreyFoster Aubrey | | Foster AveryAnnPhillips Avery | Ann | Phillips Beerus Beerus BenjaminThomasHarris Benjamin | Thomas | Harris CharlotteMitchell Charlotte | | Mitchell ChristopherJackson Christopher | | Jackson DanielJamesMiller Daniel | James | Miller DavidAndrewJohnWilliams David | Andrew John | Williams Dende Dende DylanJamesWard Dylan | James | Ward ElijahWatson Elijah | | Watson EllaSophiaRoberts Ella | Sophia | Roberts
@ExcelForFreelancers
@ExcelForFreelancers 2 ай бұрын
Hi and thanks very much. Yes it should be possible looping through the characters in a string and uusing the Asc code such as Function SplitByCapitalLetters(inputStr As String) As String Dim i As Integer Dim result As String result = Mid(inputStr, 1, 1) ' Start with the first character (always a capital letter) ' Loop through the rest of the characters in the string For i = 2 To Len(inputStr) If Asc(Mid(inputStr, i, 1)) >= 65 And Asc(Mid(inputStr, i, 1))
@kartickchakraborty9135
@kartickchakraborty9135 2 ай бұрын
@ExcelForFreelancers Thank you Randy. You're the best VBA Trainer.
@ExcelForFreelancers
@ExcelForFreelancers 2 ай бұрын
Thank you so very much, I really appreciate that
@gustavopineda7933
@gustavopineda7933 Ай бұрын
@ExcelForFreelancers
@ExcelForFreelancers Ай бұрын
Thank you for your Likes, Shares & Comments. It really helps.
@Jojosmith342
@Jojosmith342 10 ай бұрын
PLEASE SUBSCRIBE !! SUBSCRIBE TO RANDY'S HARD WORK, THE BEST VBA TEACHER ON KZbin. Thumbs up 👍to his passion & dedication to teach. Thanks Randy for another excellent, valuable tutorial. God bless you!
@ExcelForFreelancers
@ExcelForFreelancers 10 ай бұрын
Thank you so very much, I really appreciate that Jojo, so very kind of you. Thank you for your Likes, Shares & Comments. It really helps.
@kartickchakraborty9135
@kartickchakraborty9135 2 ай бұрын
Look Randy, I've created a Dynamic Spilled Array Formulae that can split any Names that contain any number of Spaces as a Delimiter. Thank you very much for your priceless training. Next, I will try to create splitting Names that contain No Delimiter, splitting strings with Multiple Delimiters, splitting Text and Numbers from AlphaNumeric Characters and last but not the least, splitting the Domain Names from URL. (I've tried my best to align the Data here on KZbin Comment Section. Please don't read this comment on your Mobile Phone as the alignments of text (Raw Data and Output) are not correct on Phone as they are on PC or Laptop.) Raw Data: ---------------- Sr. No. Names First Names Middle Names Last Names 001 Goku 002 Amanda Taylor 003 Alexander William James Brown 004 Florian Henckel Von Donner Smarck 005 Frieza 006 Lily Grace Cooper 007 Vegeta Output: ------------ Sr. No. Names First Names Middle Names Last Names 001 Goku Goku 002 Amanda Taylor Amanda Taylor 003 Alexander William James Brown Alexander William James Brown 004 Florian Henckel Von Donner Smarck Florian Henckel Von Donner Smarck 005 Frieza Friza 006 Lily Grace Cooper Lily Grace Cooper 007 Vegeta Vegeta Code: --------- Option Explicit Function SpilledArrayNamesByRange(InputRange As Range) As Variant 'Here, I set the Return Type of Function as Variant since it delivers an Array of Values. Dim SplitNamesBasedOnSpace() As String Dim MaxNameRow As Long MaxNameRow = InputRange.Rows.Count - 1 Dim MaxNameColumn As Long MaxNameColumn = 2 ReDim SplitNamesBasedOnSpace(0 To MaxNameRow, 0 To MaxNameColumn) Dim Cell As Range Dim CurrentRow As Long CurrentRow = 0 For Each Cell In InputRange Dim NamePart() As String NamePart = Strings.Split(Expression:=Strings.Trim(String:=Cell.Value), Delimiter:=" ") If UBound(NamePart) = -1 Then 'Incase of Blank Cell, The UBound Array Function returns -1 SplitNamesBasedOnSpace(CurrentRow, 0) = Empty SplitNamesBasedOnSpace(CurrentRow, 1) = Empty SplitNamesBasedOnSpace(CurrentRow, 2) = Empty ElseIf UBound(NamePart) = 0 Then SplitNamesBasedOnSpace(CurrentRow, 0) = NamePart(0) SplitNamesBasedOnSpace(CurrentRow, 1) = Empty SplitNamesBasedOnSpace(CurrentRow, 2) = Empty ElseIf UBound(NamePart) = 1 Then SplitNamesBasedOnSpace(CurrentRow, 0) = NamePart(0) SplitNamesBasedOnSpace(CurrentRow, 1) = Empty SplitNamesBasedOnSpace(CurrentRow, 2) = NamePart(1) ElseIf UBound(NamePart) = 2 Then SplitNamesBasedOnSpace(CurrentRow, 0) = NamePart(0) SplitNamesBasedOnSpace(CurrentRow, 1) = NamePart(1) SplitNamesBasedOnSpace(CurrentRow, 2) = NamePart(2) Else Dim Store As String 'Store comes into use when there are more than 2 (0 To 2) Name Parts (For Example: Florian Henckel Von Donner Smarck) Dim Counter As Long For Counter = 1 To UBound(NamePart) - 1 Store = Store & " " & NamePart(Counter) Next Counter Store = Strings.Trim(String:=Store) SplitNamesBasedOnSpace(CurrentRow, 0) = NamePart(LBound(NamePart)) SplitNamesBasedOnSpace(CurrentRow, 1) = Store SplitNamesBasedOnSpace(CurrentRow, 2) = NamePart(UBound(NamePart)) End If Store = Empty CurrentRow = CurrentRow + 1 Next Cell SpilledArrayNamesByRange = SplitNamesBasedOnSpace End Function
@ExcelForFreelancers
@ExcelForFreelancers 2 ай бұрын
Wow that's amazing and a great idea! I look forward to seeing your solutions for all these other cases. I'm always amazed by the creative ways people use VBA.
@kartickchakraborty9135
@kartickchakraborty9135 2 ай бұрын
@@ExcelForFreelancers Thank you Randy, it's all your credit. Without you, I am nothing.
@kartickchakraborty9135
@kartickchakraborty9135 2 ай бұрын
@@ExcelForFreelancers If you're in my country, I'll personally contact to you. You're a great teacher and above all you're a great human being.
@ExcelForFreelancers
@ExcelForFreelancers 2 ай бұрын
Thank you so very much, I really appreciate that
How To Find ANY Record With Excel VBA + Free Cheat Sheet
26:48
Excel For Freelancers
Рет қаралды 9 М.
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
Watch these 28 minutes if you want to become an Advanced VBA user...
29:01
Excel Macro Mastery
Рет қаралды 57 М.
VBA For Beginners: Mastering Variables Like A Pro
24:30
Excel For Freelancers
Рет қаралды 20 М.
How To Master The For/Next Loop | Excel VBA For Beginners
20:55
Excel For Freelancers
Рет қаралды 10 М.
The Excel Functions Almost Everyone Overlooks (Better Than SUMIFS)
10:29
MyOnlineTrainingHub
Рет қаралды 129 М.
Make Excel Formulas Dynamic with the Hash Sign
10:54
Kenji Explains
Рет қаралды 302 М.
How To Determine The Last Used Row & Column In Excel VBA
15:48
Excel For Freelancers
Рет қаралды 7 М.
Excel VBA Arrays, Resize (ReDim, Preserve) Arrays, Create Functions That Return Dynamic Arrays
27:24
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 24 М.
Advanced Filters: Master These Simple Filtering Hacks In Excel VBA Today
23:26
Excel For Freelancers
Рет қаралды 13 М.
How to Use Arrays Instead of Ranges in Excel VBA
10:20
Excel Macro Mastery
Рет қаралды 208 М.