Excel VBA Tutorial for Beginners (Part 6/10): Conditions and Loops

preview_player
Показать описание

Welcome to the Excel Macros/VBA tutorial for beginners. In this sixth video we'll talk about conditions and loops. We will cover the different types of conditional statements and loops, and how to work with them in Excel VBA.

00:00 Conditional statements
00:20 If statement
05:08 Select Case statement
06:48 Loops
07:32 For Next Loop
10:02 For Each Loop
12:18 Do Loops

In the next video we will work with arrays. Upcoming videos will cover the contents as per below.

Contents:
1. Introduction
2. Modules and Procedures
3. Excel Object Model
4. The Range Object
5. Variables
6. Conditions and Loops
7. Arrays
8. Messages and Input
9. Userforms
10. Debugging and Error Handling

And yet, if you want more, you can find various Excel templates, dashboards, and applications of different nature in the other blogs of the Excel Macro Mania saga:
Рекомендации по теме
Комментарии
Автор

12:50 Why does it work without "Dim num as integer"?

rustemgubashov
Автор

Hi, I need some help
A person enters data on a Sheet2 in this order:
Zone (A, B or C)
On the cell below, the name of the product (A1 - A5)
And on the cell below that one, the sales.
Like this:
Zone B
A4
4000

But that entries are spread on an specific range (A1:K30) just following the order I mentioned above
There are empty cells on that range and some info is mistaken/incomplete or some info is outside that range

For example
(on F13) Zone C
(on F14) A2. (on G14) Zone A
(on F15) 3200. (on G15) 1200
(on H31) Zone c
(OnH32) A4
(onH33) 900

On a Sheets that is already created (Sheet1) I have a table with 5 headers A1-A5 and on the left side I have Zone A
Zone B
Zone C
Total
(A 6X5 table including headers)

I need to color with yellow the entries that are mistaken or are missing información
And for every correct entry I have to find all the sales and put them on the right Product-Zone reference on the table of Sheet1 and SUM them I need to find all the sales of the other sheets and SUM them on my table of Sheet1

Finally I have to count how many entries were right and how many were colored yellow (the mistaken ones) and put that info below my table on Sheet1
How could I do that?

antoniomendoza
welcome to shbcf.ru