Excel vba to select next option in autofilter drop down menu

gberg

Board Regular
Joined
Jul 16, 2014
Messages
186
Office Version
  1. 365
Platform
  1. Windows
I have a table that I want to cycle through the items in one of the columns using the autofilter. There are thousands of rows and hundreds of items to filter by so I was hoping to have a macro to cycle though each unique item in Column B of my table.


Here is an example of the data in Column B that I would want to filter by one by one with a macro
8I3096
8I3097
8I3097
8I3097
8I3098
8I3098
8I3099
8I3100
8I3100
8I3101
8I3102
8I3103
 
The modeless MessageBox pauses the macro and allows you to access any cell in the workbook.

It does allow to access any cell but it does not allow for any editing/changes.

The above is what prompted me to code this custom MsgBox function which halts code execution, but allows for interacting with excel and for editing cells.

I hope it is useful & robust enough.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,216,127
Messages
6,129,022
Members
449,481
Latest member
joaotcosta23

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