+ Reply to Thread
Results 1 to 5 of 5

problem autofiltering text (numbers) including comma

  1. #1
    Registered User
    Join Date
    07-14-2010
    Location
    sweden
    MS-Off Ver
    Excel 2003
    Posts
    14

    problem autofiltering text (numbers) including comma

    Hi!
    Im writing a program that lets the user choose filtercriterias from comboboxes and checkboxes.

    two programs containing the "exact" same code react differently. When filtering one sheet containing numbers and text formated to "text" The numbers get an error notation which says "number stored as text".

    The other sheet, formated in the same way, doesnt have this notation by its cells.

    The autofilter on the first sheet works fine! ex. finding all rows containing 7,23...
    The second sheets filterfunction doesnt work.

    Here's some of my code:
    Please Login or Register  to view this content.
    The data comming in to the autofilter seems on the "watch" to be correct.. a string with the value 7,32 for ex.

    anyone whos got an idea what the problem could be? seems like something with the commas.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: problem autofiltering text (numbers) including comma

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-14-2010
    Location
    sweden
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: problem autofiltering text (numbers) including comma

    Im sorry, can you please explain that code?

    the replace"thing" solved it when i used it. Thanks! Would still like an explaination of the other things in your code didnt work for me..
    Last edited by petca059; 07-14-2010 at 11:13 AM.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: problem autofiltering text (numbers) including comma

    It's meant to be the replacement and improvement of your sub 'kontfilter'.

    But it has an omission

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-12-2014
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    1

    Re: problem autofiltering text (numbers) including comma

    Try this:

    (...)
    Selection.AutoFilter Field:=kol, Criteria1:="=" & filtervarde, VisibleDropdown:=False
    (...)



    ~~~~> Criteria1:="=" & YourVariable

    Hope it works

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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