+ Reply to Thread
Results 1 to 4 of 4

Min/Max filter to ignore blank range

  1. #1
    Registered User
    Join Date
    09-27-2024
    Location
    South Dakota, USA
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Min/Max filter to ignore blank range

    Hello, I am very new to VBA and completely over my head. I have a sheet created by a VA to filter data based on multiple criteria. There are certain fields that have a min/max filter (C24:D27 & C30:D31). Right now, the macro only runs if there is data in these cells, so the solution is to have it go from 0 to 9999,999,999. It runs if either the min or max for each criteria is blank, but not if both cells are.

    Ideally I would like to be able to leave those cells empty and not have to insert the filler text. I have been able to make this work using a simple formula, but I have no idea how to transfer that to a macro. If the cell is blank, it should be treated as 0 in the min column (C) and 999,999,999 in the max (D) column. Is this something that can be done with VBA? The module controlling the MinMax function is below.

    Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,307

    Re: Min/Max filter to ignore blank range

    Possibly...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-27-2024
    Location
    South Dakota, USA
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: Min/Max filter to ignore blank range

    Thank you. Would this replace the entire code or fit into the existing code somewhere?

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,307

    Re: Min/Max filter to ignore blank range

    Hard to say without seeing the file or a sample of it, but I would assume it does not replace your existing code. Whether it runs separately or within your existing code would be your decision. The above code simply fills in the blank cells with either 0 or 999999, depending on the column.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] how to ignore blank cells in a range
    By Mingeita in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-31-2022, 06:45 AM
  2. [SOLVED] Ignore blank cells when applying filter
    By hasan mougharbel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2022, 08:47 AM
  3. [SOLVED] Ignore Blank Cells in Looping Range
    By LavendarRabbit in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2021, 02:17 PM
  4. [SOLVED] Dynamic Named range Ignore blank cells
    By HaroonSid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-17-2017, 05:03 AM
  5. Copy Range and Paste only Values (ignore blank cells)
    By ksayet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2015, 04:37 PM
  6. [SOLVED] How to ignore blank cells in Range Lookup?
    By Brand012 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 01-04-2014, 01:42 AM
  7. [SOLVED] Ignore Blank, zeros in a range sort
    By jpsnickers in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-01-2013, 02:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1