+ Reply to Thread
Results 1 to 12 of 12

How to add Data filter

  1. #1
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    How to add Data filter

    i want to add the Date filter option. but i don't know to add in this code. please help me how to resolve this issue.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to add Data filter

    Please help me.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How to add Data filter

    Hi Sanjibghosh,

    I'd be learning how to do an Advanced Filter with dates. I'd also remove all those merged cells on all your sheets as they mess things up.

    https://www.ablebits.com/office-addi...vanced-filter/

    After you can structure your data (without merged cells) and can do this by hand a few time, you should record a macro to show your steps. Then modify the macro to use your input boxes.

    Learn to use Advanced Filters first.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to add Data filter

    Hi Marvin,

    Thank you. But can't change the data structure. I have one search option (by BD name) in this code. but want to search the data by BD name as well as Date also. please help to resolve the issue

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How to add Data filter

    You might not need to change the structure. You will need to create Advanced Filters like Excel wants them. Learn Advanced Filters and it will lead to your answer. If you mean that merged cells are changing the structure, that may be a problem.

    Read this also:
    http://www.techrepublic.com/blog/10-...u-in-the-butt/

  6. #6
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to add Data filter

    it is very helpful to me, if you can do it on my file.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How to add Data filter

    Hi Sanjibghosh,

    You need to remove those Merged Cells at the top of your sheets. If you don't remove them, you can't do this problem, as Excel works with TABLES of data. A table has header rows where each cell is a different name from the others. Because you have MERGED cells in rows 1 and 2 your data is NOT a table and you can't do Advanced Filters on it. When you said:
    But can't change the data structure.
    That made your problem impossible to do for me.

    Read about TABLES of data and change your header rows for all sheets and attach your data again.

    Read: http://contextures.com/xlExcelTable01.html
    In the above link you don't have a "UNIQUE HEADING" because you have merged cells in rows 1 and 2.

  8. #8
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to add Data filter

    Hi MarvinP,

    Can you do it for me with out Merged Cells in my file? It is very helpful to me if you do.

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: How to add Data filter

    This will get the data from whatever sheet you have selected from the combobox and use the dates entered in the textboxes. You will have to edit the code to get the correct column results you are looking for.

    Please Login or Register  to view this content.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to add Data filter

    The date fields are inaccessible - how will you enter the dates?
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  11. #11
    Forum Contributor
    Join Date
    07-15-2015
    Location
    Kolkata
    MS-Off Ver
    2010 & 2013
    Posts
    303

    Re: How to add Data filter

    Hi davesexcel

    I am trying this code. but i am getting an error. Can you do it in my excel file and sand back? It will very helpful to me if you do it.
    Attached Files Attached Files

  12. #12
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: How to add Data filter

    Your getting an error, because the name you selected does not have a sheet named after it.

    Populate the comboboxes with actual sheet names, for now you can just loop through the sheets until it finds the correct sheet name, if it doesn't find it, nothing will happen.
    You are asking for errors by not having the combobox populated correctly, and by using textboxes as the input dates, you could use comboboxes for that as well so there will be no chance of dates being entered incorrectly.
    Please Login or Register  to view this content.

+ 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] Problem with filter (filter with data in a row)
    By Dyordedgar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2017, 04:30 PM
  2. VBA Advanced Filter - Two Filters Without Deleting Bottom Filter Data In Same Column Range
    By hysterical.useless in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2017, 02:54 PM
  3. [SOLVED] Find Count of filter, Advanced filter Data
    By linok in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 01-06-2015, 04:41 AM
  4. Replies: 1
    Last Post: 12-12-2014, 06:46 AM
  5. Replies: 0
    Last Post: 01-16-2014, 10:55 AM
  6. Replies: 2
    Last Post: 10-07-2013, 04:57 AM
  7. Second Advanced Filter does not work based on the data generated from the filter
    By mucc1928 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2011, 02:42 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