+ Reply to Thread
Results 1 to 4 of 4

Macro to select filtered data is inconsistent..

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Macro to select filtered data is inconsistent..

    Dear Excel Experts,

    I've been trying to find solution for this for almost a week but to no avail. Just really don't understand which part I've done wrong.

    My code below should do copy to filtered data and paste them below the row (skip one blank row to differ) of the original data. The original data is in csv format which located in separate workbook. It has a checking command line to ensure that the filtered data is not blank, else skip and run next sub macro. This is needed to run through thousands of original data in separate workbooks. The weird thing that happens is that some files, the macro detects blank correctly, some won't and will prompt the error and stops the macro. I tried to change between count and countA for detecting the filtered data rows but if i do that the result will also be different, as if some of it is detected as text so, it will count in CountA but some will only be counted if using Count.. I have tried different version of Excel, ranging from 2010 up to 2016 but no difference.. I have tried many different macro commands to count only visible data rows but still don't give any difference.

    This has been so much pain for me as I need to get accurate data to calculate SLA performance of each staff in attending tickets. Please, please, please help me..


    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to select filtered data is inconsistent..

    Almost impossible to comment without seeing the workbook. Please upload this and the csv file on which it is dependent.
    Many of us would prefer to go back to basics since often we can find more efficient ways of achieving your goal.
    So in a separate note clearly explain what you start with, what you want to do and what the results should be. Be sure to manually add the results and layout you expect to see on a separate worksheet. Once we can see the goal and what you start with we'll be able to comment further.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Macro to select filtered data is inconsistent..

    Hello Richard Buttrey,

    Firstly, I really thank you for your swift response. After your reply, I suddenly had an idea to overcome this problem. I tested it and it worked just as I really need it. What I did was create another submacro which actually puts a formula to define "YES" if meet criterias either in col D or E. Then I filter data based on "YES". After that, followed by all my other formulas. So, only when I do this that I can have an accurate number of filtered data rows that match my criterias for each file and I don't encounter error anymore..

    *phew* what a relief! After almost a week of sleepless nights.... only after I posted my problem here that I finally got the correct solution!.

    Thanks to you and all who may have spent sometime to read my problem and trying to create for solution.

    With this, I consider this issue is closed and solved.

    Thank you for your time.

  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 to select filtered data is inconsistent..

    Hi Dahlia

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    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.

+ 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. VBA Macro for Menu to Select multiple filtered rows
    By dharrier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2015, 10:33 PM
  2. [SOLVED] Macro command to select filtered rows only
    By Gandalf21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2013, 11:31 AM
  3. [SOLVED] Macro to select visible rows containg data in filtered list
    By knevil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-15-2013, 01:22 PM
  4. [SOLVED] Select filtered data
    By flashdisk in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-02-2013, 09:53 AM
  5. Macro to select a specific column of filtered data in a table
    By mgrothendick in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2012, 06:01 PM
  6. Select filtered data using a macro
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-29-2012, 08:22 AM
  7. select filtered data only
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-08-2011, 05:46 AM

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