+ Reply to Thread
Results 1 to 5 of 5

Advanced filters using VBA

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Question Advanced filters using VBA

    I have a job to generate reports of user based worksheets (phone bill details) to calculate total incoming/outgoing calls and sms from a specific user. I do it by using filters.. (See the attachment file "data" is the phone bill and "report" is the analyzed sheet..
    I want to make a macro to do the job for me..
    Attached Files Attached Files

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: Advanced filters using VBA

    Put this formula in cell B10 and then you can copy it down and across.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Advanced filters using VBA

    Your code works fine.. but i have to manually add each number in Report sheet.. kindly write a code to automatically generate Report Sheet and add each Number..
    It should also calculate total rows in data sheet etc.. coz there are thousands of sheets for me to Analyze.. Please Help me saving my butt
    Last edited by ahsanzafar; 11-08-2015 at 02:33 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Advanced filters using VBA

    Hello ahsanzafar,

    The attached workbook will create a report from the "Data" sheet. There is a button on the "Report" sheet to run the macro. The button will not be printed when the sheet is printed.

    This took some time because the report is dynamic. The needed rows are added based on IMEI and Party entries. The total row is added at the end of the table. There are no formulas in this report. The macro handles everything.

    My assumption is you get one customer's data at a time and run the macro for each customer. if your needs are different, let me know and I will adjust the macro.

    Although the code is rather long, it is fast. You will have the report as soon as you click the button.

    Create Report Macro
    Please Login or Register  to view this content.
    Macro to Sort a List in Place
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Leith Ross; 11-09-2015 at 07:39 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Advanced filters using VBA

    Hello ahsanzafar,


    Thanks for the rep points. Does the macro do what you want?

+ 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. Error in advanced filters
    By loud_scream in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2011, 09:21 PM
  2. Advanced Filters
    By Zan03 in forum Excel General
    Replies: 2
    Last Post: 03-22-2010, 04:47 PM
  3. Help with Advanced Filters and Sumif's
    By Pelona in forum Excel General
    Replies: 6
    Last Post: 07-28-2009, 03:41 PM
  4. Advanced filters
    By kaffal in forum Excel General
    Replies: 3
    Last Post: 01-23-2009, 10:31 PM
  5. [SOLVED] Advanced Filters
    By Louise in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-28-2005, 07:05 AM
  6. advanced filters
    By jiwolf in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-18-2005, 02:05 PM
  7. Advanced Filters
    By Louise in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-26-2005, 07:05 AM
  8. Advanced Filters
    By carlito_1985 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-29-2005, 02:40 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