+ Reply to Thread
Results 1 to 2 of 2

Advanced filtering criteria fail when the number is not an integer!

  1. #1
    Registered User
    Join Date
    05-20-2017
    Location
    athens
    MS-Off Ver
    2010
    Posts
    5

    Advanced filtering criteria fail when the number is not an integer!

    Hi.

    I need to use the advanced filter to copy cells into a different sheet. My code is this.

    Please Login or Register  to view this content.

    Problems:

    1) For some reason Sheets("SR26").Range("A1").CurrentRegion.AdvancedFilter just doesnt work. I dont have any empty rows in that range(but there might be some empty cells, is there an alternative to this?)

    2) When i put critiria like >10.1 or anything with a decimal (not integer) it returns nothing. I dont know why, and if that is , i dont know how to convert the ranges to smthg like double.

    Is there another workaround?

    Ty



    [Edit] , I think that it does not recognize it as a number after i put the decimal. The code on the critiria is smthg like this
    Please Login or Register  to view this content.
    Last edited by feronimus; 07-02-2017 at 06:50 AM.

  2. #2
    Registered User
    Join Date
    05-20-2017
    Location
    athens
    MS-Off Ver
    2010
    Posts
    5

    Re: Advanced filtering criteria fail when the number is not an integer!

    2nd SOLVED.

    For some weird reason it needed for me to cast the 10,1 to 10.1 (the hint is in the decimal character from decimal to point. I did it with
    First=mod(number;1) and Second=round(int(number);0)*1000 and then i set the critiria to ="<="&First&"."&Second

    I still dont know why the first one is not working.
    Last edited by feronimus; 07-02-2017 at 07:42 AM.

+ 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] Easy filtering method via vba/formula/advanced filtering?
    By jedemeyer1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2014, 12:35 AM
  2. Advanced filtering with a criteria list
    By jimmy13 in forum Excel General
    Replies: 4
    Last Post: 12-19-2013, 01:58 PM
  3. Count the number of occurrences of an integer withing a larger integer
    By nnktran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2010, 01:04 PM
  4. Excel 2007 : Advanced Filtering criteria
    By rocu in forum Excel General
    Replies: 1
    Last Post: 11-14-2008, 01:39 AM
  5. Advanced Filtering with multiple criteria
    By drumbody in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2007, 08:51 AM
  6. [SOLVED] trouble filtering a list. Why isn't column filtering?-number of criteria
    By Pat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-18-2005, 11:05 AM
  7. [SOLVED] Advanced Filtering - Computed Criteria
    By KIM in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-28-2005, 05:06 PM

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