Print the 3rd element of an array with a 0-based indexĬreate an empty 2-dimensional array with 3 rows and 2 columns, that can accommodate multiple data types Set the value at the 3rd position of an array with a 0-based index Print the values in cells A1 through A5 to the screenĬreate an empty array with 5 integer elements and a 0-based index >Įlse If val >= 200 Then: MsgBox(“Medium”) If the value stored in the variable “val” is between 200 and 1,000, print the text “Medium”. If the value stored in the variable “val” is greater than 1,000, print the text “Large”. Whole numbers between -2,147,483,648 and 2,147,483,647ĭecimal number with seven digits of precisionĭecimal number with fifteen digits of precision
Use a built-in worksheet function in a macroĪ(“A:A”)Ĭomment out a line of code - note the apostrophe (‘) UserInput = InputBox(“What’s your favorite color?”)Įxecute a macro from within another macro Just want the cheatsheet? No problem! Please enjoy and if you'd like to submit any suggestions, feel free to email us at Programming Operations Operation You'll also build VBA projects, including a complete data management system with a sleek user interface that you can use to add to your portfolio and wow employers! You'll not only learn to become a top 10% VBA Programmer and Data Analyst by learning advanced topics most courses don't cover.
You'll learn VBA from actual industry professionals alongside thousands of students in our private Discord community. However, if you're stuck in an endless cycle of YouTube tutorials and want to start building real world projects, become a professional developer, have fun and actually get hired, then come join the Zero To Mastery Academy. This has made it very popular with companies solving analytics challenges and is a great language to learn if you're interested in becoming a Data Scientist or Data Analyst VBA was created by Microsoft and is the the programming language that lives within Excel and the Microsoft Office suite of products. If you’ve stumbled across this cheatsheet and are just starting to learn VBA, you've made a great choice!