VBA ON YOUR OWN: For Loop through table data - Simple Excel VBA

preview_player
Показать описание
Welcome to the 1st episode of VBA On Your Own series!
In todays video we're going to filter out data using For Loop!

WATCH NEXT:

TIME STAMPS:
0:00 Intro
0:17 Exercise: Loop through table data
1:11 Variables declaration
2:38 Constants
3:03 With brackets
4:44 For Loop
6:13 Check the code
7:40 We are on the road to 1000 subscribers!

MY EQUIPMENT:

SITE & SOCIALS:

CONTACT:

Don't forget to leave like and subscribe to my channel, it means a lot to me :)

DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel so I can continue to create and provide more content for You!
Рекомендации по теме
Комментарии
Автор

What I forgot is that the number of rows being searched is 20.

gerardvaneggermond
Автор

Hello sir, maybe you can help me I made code in Vba but it is long now I would like to make it smaller and maybe "loop" and "for loop" can help with that.
Here part of the code:
Application.ScreenUpdating = False
If Sheets("Menu").Range("E2") = 1 Then
Sheets("toplay1").Select
Range("A1").Select
ActiveCell.Formula2R1C1 = _
"=FILTER('S1'!R[1]C[1]:R[20]C[1], 'S1'!R[1]C[1]:R[20]C[1]<>" "")"
Range("B1").Select
ActiveCell.Formula2R1C1 = _
"=FILTER('S1'!R[1]C[5]:R[20]C[5], 'S1'!R[1]C[5]:R[20]C[5]<>" "")"
The Range continues until "J1" you also notice that at "c[ ] each time 4 are added, that is because the search area moves 4 columns each time, if you can help me with this I will be able to continue with the rest I think, can you help me PLEASE

gerardvaneggermond
welcome to shbcf.ru