VBA Loop Through All Items in Filter Excel

VBA Loop Through All Items in Filter Excel

VBA Tutorial

5 лет назад

8,847 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Gerard van Eggermond
Gerard van Eggermond - 14.06.2023 15:22

Hello sir, maybe you can help me, I made a code but it is too long now I want to reduce it, is this possible? One section has the following code;
Application.ScreenUpdating = False
If Sheets("Menu").Range("E2") = 1 Then
Sheets("toplay1").Select
Range("A1").Select5
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]<>" "")"

This continues, at (c[ ]) each time 4 is added until 37 is reached
Could you help me?
Thanks in advance.

Ответить
Jean Pierre
Jean Pierre - 25.06.2021 02:32

Hi what if the sheet you are using contains a table?

I pasted the criteria on V1, and the auto filter does not work?

Ответить
Abhishek Singh
Abhishek Singh - 19.05.2021 19:11

Didn't understand a damn thing man!

Ответить
kishor saravanan
kishor saravanan - 09.09.2020 21:56

I want to loop throw many column can you help me out i cant under "items=" line

Ответить
Kedar Hatkar
Kedar Hatkar - 04.05.2020 18:22

My code is not allowing to create the scripting dictionary object, is there an alternative

Ответить
K P Manoj
K P Manoj - 03.05.2020 07:26

Really the one I was looking for since a newbie to Vba. Useful stuff

Ответить
Person X
Person X - 08.10.2018 06:33

Good content, but get a voice coach. Improving that will definitely help you stick out. Only thing i would suggest is using a count of the number of items in the original range as the paste range...1000 hard code can end up being a problem later and this makes the code a bit more dynamic.

Ответить