Ms Excel and VBA Macros๐Ÿ’ปโŒจ๏ธ๐Ÿ–ฅ
10.1K subscribers
53 photos
2 videos
39 files
179 links
Download Telegram
I've found Clickworker. It's an app where you earn money on the side with surveys, app tests, taking pics or short videos, etc. I think itยดs something you'd be into as well. Check it out. Registration is free.

https://clickworker.page.link/BhZFsGV6RoaxiZTE9
VBANotesForProfessionals.pdf
2.2 MB
Friends, I hope this will be helpful to all of you for vba learning.
Do you want this type of more e-books?
Anonymous Poll
94%
Yes
6%
No
Are you looking for any website for captcha typing?
Anonymous Poll
86%
Yes
14%
No
Happy Friendship day to all of you.
๐ŸŒŸ Master VBA Loops: Automate Your Tasks! ๐ŸŒŸ
In VBA, there are several types of loops that allow you to execute a block of code repeatedly. Here are the main types of loops with examples:
๐Ÿ” For Loop
The For loop is used to repeat a block of code a specific number of times.
Example:

Sub ForLoopExample()
Dim i As Integer
For i = 1 To 5
Cells(i, 1).Value = "Row " & i
Next i
End Sub
In this example, the code runs five times, filling cells A1 to A5 with the text "Row 1" to "Row 5."
๐Ÿ”„ For Each Loop
The For Each loop is used to iterate over a collection of objects.
Example:

Sub ForEachLoopExample()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
MsgBox "Worksheet name: " & ws.Name
Next ws
End Sub
In this example, the code loops through each worksheet in the workbook and displays its name in a message box.
โ™ป๏ธ While Loop
The While loop executes a block of code as long as a specified condition is True.
Example:

Sub WhileLoopExample()
Dim i As Integer
i = 1
While i <= 5
Cells(i, 1).Value = "Row " & i
i = i + 1
Wend
End Sub
In this example, the code runs until i is greater than 5, filling cells A1 to A5 with the text "Row 1" to "Row 5."
๐Ÿ” Do While Loop
The Do While loop is similar to the While loop, but it is slightly more flexible in syntax.
Example:

Sub DoWhileLoopExample()
Dim i As Integer
i = 1
Do While i <= 5
Cells(i, 1).Value = "Row " & i
i = i + 1
Loop
End Sub
In this example, the code runs until i is greater than 5, filling cells A1 to A5 with the text "Row 1" to "Row 5."
โน๏ธ Do Until Loop
The Do Until loop executes a block of code until a specified condition is True.
Example:

Sub DoUntilLoopExample()
Dim i As Integer
i = 1
Do Until i > 5
Cells(i, 1).Value = "Row " & i
i = i + 1
Loop
End Sub
In this example, the code runs until i is greater than 5, filling cells A1 to A5 with the text "Row 1" to "Row 5."
๐Ÿ”€ Nested Loops
You can also use nested loops, which are loops within loops.
Example:
Sub NestedLoopsExample()
Dim i As Integer, j As Integer
For i = 1 To 3
For j = 1 To 3
Cells(i, j).Value = "Row " & i & " Col " & j
Next j
Next i
End Sub
In this example, the code fills cells A1 to C3 with the text "Row x Col y" where x and y correspond to the row and column numbers.
๐Ÿ‘7โค2๐Ÿ‘1
๐ŸŽ“ Unlock Your Potential with Free Excel VBA Course! ๐ŸŽ“
Are you ready to master Excel VBA and take your skills to the next level?

Below are the links of free Excel VBA courses which will help you to learn how to automate tasks, create powerful macros, and streamline your workflow!

1) https://www.simplilearn.com/free-excel-macros-vba-course-skillup

2) https://www.mygreatlearning.com/vba/free-courses
END-TO-END-ANALYTICS-WITH-MICROSOFT-POWER-BI.pdf
4 MB
END-TO-END-ANALYTICS-WITH-MICROSOFT-POWER-BI.pdf
โค2๐Ÿ‘2