Enter in Cell the Column Letter that is Filtered

Michael Fowler

New Member
Joined
Jan 23, 2024
Messages
28
Office Version
  1. 2021
  2. 2016
Platform
  1. Windows
Is there a way that you can automate into a cell (either by formula or macro) the Column Letter that is filtered ?

Example : Column D is filtered, so as a result I want "D" or the Column Heading Name automatically entered into a cell.
 
Hello again. I've got your code above as a module in the sheet that needs refreshing. I've also got =DetectFilter() in a cell outside the range being filtered. But it's still not automatically refreshing when I select an auto-filter.
it not refresh after filtered, if refresh after you select another cell of that worksheet, the code will need to place at worksheet that has "=DetectFilter()" formula
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
it not refresh after filtered, if refresh after you select another cell of that worksheet, the code will need to place at worksheet that has "=DetectFilter()" formula
Yes, I think I've got all that. I've got this formula outside the filter range in a sheet named "Data" ... =Detect_Filter() and I've got this in the VBA code ...
 

Attachments

  • Screenshot 1.jpg
    Screenshot 1.jpg
    52.2 KB · Views: 6
Upvote 0

Forum statistics

Threads
1,224,826
Messages
6,181,192
Members
453,021
Latest member
pingpong7117

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