How to loop over all indice in a filtered column

Zyeuxrouge

New Member
Joined
Jun 17, 2022
Messages
5
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
Hello,

I want to loop over all indices in a filtered column & do something for each indice each time, how can i do that please ?

1656795734508.png


Thank you in advance :)
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Maybe
VBA Code:
Sub Example()
    Dim c As Range
    For Each c In Range("A2:A" & Range("A" & Rows.Count).End(xlUp).Row).SpecialCells(xlCellTypeVisible)
        If c <> "" Then 'do something
    Next c
End Sub
 
Upvote 0
Maybe
VBA Code:
Sub Example()
    Dim c As Range
    For Each c In Range("A2:A22").SpecialCells(xlCellTypeVisible)
        If c <> "" Then 'do something
    Next c
End Sub
Thank you for your answer, sorry i missed to say that i want to loop over the criteria*, as i searched i guess there is no way to loop over the criteria single to single, i think i need to store the uniques values in an array then manage to loop with the array
 
Upvote 0

Forum statistics

Threads
1,223,785
Messages
6,174,540
Members
452,571
Latest member
MarExcelTips

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top