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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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: 3
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,269
Members
449,219
Latest member
daynle

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