+ Reply to Thread
Results 1 to 9 of 9

Macro works in Excel 2007 but not compatible with 2003

  1. #1
    Registered User
    Join Date
    10-13-2015
    Location
    Wroclaw
    MS-Off Ver
    2003
    Posts
    7

    Macro works in Excel 2007 but not compatible with 2003

    Hello everyone
    I've compatibility problem, macro works in Excel 2007 and higher but doesnt in 2003. i've problem with code below, error occurs with Operator, when i delete this string it doesnt work properly. Any help would be appreciated
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-16-2015 at 11:24 PM. Reason: Added Code Tags

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro works in Excel 2007 but not compatible with 2003

    Hi lewap90

    Welcome to the Forum!!!

    Filtering with an array was introduced with Excel 2007. Prior to 2007 The custom AutoFilter only allows for up to 2 Criteria at a time.

    Here's a link to a possible workaround.
    http://www.techonthenet.com/excel/filters/advanced1.php
    Last edited by jaslake; 10-14-2015 at 05:21 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    10-13-2015
    Location
    Wroclaw
    MS-Off Ver
    2003
    Posts
    7

    Re: Macro works in Excel 2007 but not compatible with 2003

    Thanks for the quick response jaslake

    i 've managed to filter by range using advanced filter in VBA but i dont know how to filter this case:

    In 2nd column i have data like 1, 2, 3, 4, 5 and so on and additionaly i have "-" and "_"


    numbers 1,2, 3, 4, 5 represents active positions

    "-" and "_" represents inactive ones

    In 3rd column i have data like DW234SG, DW861KT and so on

    My criteria Range is DW234SG, DW861KT for example

    How to filter data to gather only active and only DW234SG, DW861KT at the same time?
    Attached Images Attached Images

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro works in Excel 2007 but not compatible with 2003

    Hi lewap90

    Can't do much with pictures. If you'll attach a sample file (with existing Code) I'll look at it.

  5. #5
    Registered User
    Join Date
    10-13-2015
    Location
    Wroclaw
    MS-Off Ver
    2003
    Posts
    7

    Re: Macro works in Excel 2007 but not compatible with 2003

    Here you are
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-13-2015
    Location
    Wroclaw
    MS-Off Ver
    2003
    Posts
    7

    Re: Macro works in Excel 2007 but not compatible with 2003

    Additional information for you:

    information from criteria range can occur as active and inactive in the same table and i need to filter active firstly and then filter by required information

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro works in Excel 2007 but not compatible with 2003

    Hi lewap90

    This Code in the attached creates a new Worksheet with only the Active items and then Filters that new Worksheet based on the Criteria. It's the best I can come up with at the moment.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-13-2015
    Location
    Wroclaw
    MS-Off Ver
    2003
    Posts
    7

    Re: Macro works in Excel 2007 but not compatible with 2003

    Awesome job works like a charm thank you very very much

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro works in Excel 2007 but not compatible with 2003

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    If this resolves your issue please mark your Thread as SOLVED.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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. Compatible Print Macro for Excel 2007 and 2010
    By Cansa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-27-2014, 03:41 PM
  2. problem with macro - works in 2003, debugs in 2007 - help!
    By F5JASON in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-17-2012, 02:19 PM
  3. Graphing macro works in 2003 but doesn't have some features in 2007
    By mgphill in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-02-2012, 04:01 PM
  4. Database Query macro works in Excel 2003 but fails in Excel 2007
    By NBVC in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-11-2012, 12:24 PM
  5. Macro works fine in Excel 2003 but not in 2007
    By jackdebnam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2011, 12:00 PM
  6. Insert Picture Macro works on 2007 but not 2003
    By wpryan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-06-2010, 08:13 AM
  7. Replies: 2
    Last Post: 04-21-2009, 02:42 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