• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Advanced Filter for Months|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Advanced Filter for Months|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosAdvanced Filter for Months
sp_PrintTopic sp_TopicIcon
Advanced Filter for Months
Avatar
Steven Behr
Member
Members

Power Query
Level 0
Forum Posts: 85
Member Since:
January 30, 2020
sp_UserOfflineSmall Offline
1
February 19, 2020 - 12:40 pm
sp_Permalink sp_Print

Hi,

Im building A Hazard report with VBA. In my Excel Dump TAB I have an advanced filter that will interact with various criteria ("AH") which really works well in VBA.

However, Im a bit confused on how to use the criteria "Date Of Incident" ("I2") which has inputted at various dates. 

What I want to do is use this column as an advanced filter the Months. So if there was various inputs for February, I want to able to use criteria ("AH2") change the criteria heading Date Of Incident and use the word Month to filter those months out. 

Can any one suggest anything for me on this ...Im getting stumped on this.

The macro shortcut is CTL-Shift-D

 

Thanks

steve

Avatar
Purfleet
England
Member
Members


Trusted Members
Level 4
Forum Posts: 414
Member Since:
December 20, 2019
sp_UserOfflineSmall Offline
2
February 19, 2020 - 2:43 pm
sp_Permalink sp_Print

Hi Steven

The attached is a .xlsx so not a macro workbook and therefore no code in it.

You are using A to AF as the data dump and AH as the criteria? With the output in columns AJ to BO?

Not sure having the data, criteria and output all on one sheet is ideal as the whole row will be filtered.

Can you upload again with your code (.xlsm)

Purfleet

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 648
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
3
February 19, 2020 - 9:43 pm
sp_Permalink sp_Print

By the sounds of it, you want a formula for the criteria, in which case you don't want the criteria header cell to match any columns (better to leave it blank) and then use a formula like =MONTH(I2)=2 to restrict to February.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Babak Damadi, Geoff McClure, Riny van Eekelen, Cassie Bernier
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 215
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Ngoc Qui Nguyen
Clement Mansfield
Rose .
Bindu Menon
Baruch Zemer
Purple RainbowBenefactor
MOTH Junkie
Forum Stats:
Groups: 3
Forums: 24
Topics: 6350
Posts: 27773

 

Member Stats:
Guest Posters: 49
Members: 32317
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.