E-Mail 'Extract records between two dates' To A Friend
Email a copy of 'Extract records between two dates' to a friend
Email a copy of 'Extract records between two dates' to a friend
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
This is a great piece of programming, but I cannot for the life of me get it to work in my spread sheet. I have tried naming the ranges, adding dollar signs to keep the references constant, etc., but no matter what I do, it will not filter the date range correctly.
This is the perfect solution to my need, so if there is anything you can do to help me, I would appreciate it. I could send you the spreadsheet if that would help.
Thanks
Tom
Tom,
I have updated the article. Let me know if you got it to work?
Sir
What is table 13 here?
AVIUSHEK,
Table 13 is the table name.
How to find the table name
1.Select your table
2.Press with left mouse button on the "Design" tab on the ribbon
3.Read table name in properties window on the ribbon
I am trying to use your filter-records-between-two-dates.xls Excel 97-2003 Workbook *.xls and use the #num errors removal but the returned value is #NAME? instead, can you tell me what I am doing wrong?
how to add data for Table13
Thanks for tutorial.
I developed a template to filter products between two selected dates using the userform. The filtered products are listed in the listbox. The selected products from the listbox are copied to the other worksheet.
It's image: https://imgur.com/DpkkYDq
To make the date selection easier, I added a date userform (second userform) instead of a calendar control. When press with left mouse button on the textboxes on the main userform, the date userform is opened and the user can easily select the date.
Also, I applied the elongation effect to the userform at the time of filtering.
Source codes and sample file at:https://eksi30.com/filter-products-between-two-dates-with-vba-userform/
Thank you for the tutorial! I've got this working, but would like to add in another criteria, i.e., return row with date between start date and end date and name = cell value. I added it in the 'if' criteria and get the correct number or rows returned, but not the correct rows. How do I specify this?
Brittany,
Add another logical expression to this formula:
=INDEX($A$2:$B$38, SMALL(IF(($A$2:$A$38<=$H$2)*($A$2:$A$38>=$H$1), MATCH(ROW($A$2:$A$38), ROW($A$2:$A$38)), ""), ROW(A1)), COLUMN(A1))
I have bolded the original logical expressions in the formula above.
If you have a name in cell H3 and names in cells $C$2:$C$38 the formula becomes:
=INDEX($A$2:$C$38, SMALL(IF(($A$2:$A$38<=$H$2)*($A$2:$A$38>=$H$1)*($C$2:$C$38=$H$3), MATCH(ROW($A$2:$A$38), ROW($A$2:$A$38)), ""), ROW(A1)), COLUMN(A1))
Excel 365 users using the example values in section 2 use this formula:
=FILTER(A2:C38,(A2:A38<=H2)*(A2:A38>=H1)*(C2:C38<=H3))