Filter Data with Date range.Dates are selected in user form

Does anybody could help me to create a user form, that user could select the date and time from either calendar or other control button (from Userform control Toolbox) and the VBA code would filter the data on Excel SpreadSheet depending on input...
I want user to specify start time and the end time, that I would know the period of time which is on interest and filter the data depending on inputs...
This is part of my table on Sheet1:
ID                     Time
  Products
ProdNoExit
8
04-06-2013 23:00
15
1
8
04-06-2013 23:30
205
1
8
05-06-2013 00:00
235
1
8
05-06-2013 00:30
587
1
8
05-06-2013 01:00
874
1
8
05-06-2013 01:30
155
1
8
05-06-2013 02:00
150
1
8
05-06-2013 02:30
258
1

How about this?
Right-click your tab name, and paste this code into the window that opens.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address = "$A$1" Or _
Target.Address = "$G$1" Then
Range("Database").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=Range("Criteria"), Unique:=False
End If
End Sub
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Similar Messages

  • Difference between real Hijri Date with Oracle Hijri date

    Dear ALL,
    I will appreciate if any one please let me the solution for this problem. In my application I show the Date in Hijri using the NLS setting. but the issue that "i face a deference between the real hijri date with oracle hijri date"
    Assume that the real hijri date on 18-SEP-2012 was 02/11/1433 in hijri but in oracle was 03/11/1433
    when I execute the following query it shows me "1433/11/03", but the actual Hijri date is "1433/11/02"
    select to_char(to_date('20120918','YYYYMMDD'),'YYYY/MM/DD', 'NLS_calendar='''||'ARABIC hijrah') FROM DUAL;
    IFTIKHAR

    Hi,
    It works correctly for me, too:
    SELECT  TO_CHAR ( TO_DATE ('20120918', 'YYYYMMDD')
              , 'YYYY/MM/DD'
              , 'NLS_calendar=''ARABIC hijrah'''
              )      AS h_date
    FROM    dual;Output:
    H_DATE                                                                         
    1433/11/02                                                                      I tried it on Oracle versions
    9.2.0.6.0
    10.1.0.2.0
    10.2.0.3.0
    11.1.0.6.0
    11.2.0.1.0
    and got the same results every time. What version of Oracle are you using? What other software (front end, OS, ...)?
    If it's consistently giving you the results for the day after the day wanted, then subtract 1 day before calling TO_CHAR. I know this is not a solution, just a work-around until you find and fix the real problem.

  • Use of "with master data & with out master data" at DTP update level

    Hello experts,
    In DTP, I check "with out master data". When I try to send corresponding transactional data, It is showing SID related error. Can anybody suggest what is the use of "with master data & with out master data" at DTP level.
    Thanks in advance,
    Zakir.

    HI
    HI in DTP level If you set this indicator, the system terminates the update of the request if no values are available for a data record.
    Load the relevant master data before you load the transaction data.
    If you set this indicator, the system terminates activation if master data is missing and produces an error message.
    If you do not set this indicator, the system generates any missing SID values during activation.
    In DataStore maintenance, if you do not set the SIDs Generation upon Activation indicator, the No Update without Master Data indicator in the DTP has no effect.
    thx
    vijju

  • Using report parameter in data set filter expression with an SSAS data source

    I have an SSRS report with an SSAS data source.
    Report parameters:
    Param1 - text, single select
    Param2 - text, multi-select
    Dataset:
    In Query Designer, I want to include Param1 as a filter expression so I can have "Dimension1 Begins with @Param2". I'm not sure the exact syntax to make param2 work in this.
    The point is to filter my data set on param1. If A is selected for param1, I want the data set to have the filter saying "Dimension1 begins with A"
    Anyone know how to use a report parameter in the dataset filter expression for an ssas data source?

    hi,
    try this maybe the dates you are comparing are not in the same format.
    I test data template in EBS but not with dates.
    to_date(date,'dd/mm/YY') between to_date(:p_from_date ,'dd/mm/YY') and to_date(:p_to_date ,'dd/mm/YY')
    if dont works try to put values insted of your parameter like :
    to_date(date,'dd/mm/YY') between to_date(:p_from_date ,'10/01/07') and to_date(:p_to_date ,'01/12/07') ... put dates where u can have some values in report...
    if dont work then try to print the values of the 2 parameters and the date of the select somwhere in ur report to see what you have in it..
    hope it helps..
    Regards Joe.

  • Filter records with month and date

    Hi,
    i have records as follows in the table.
    custno trn_dt amount
    1 01-jan-06 100
    1 10-jan-06 200 --->
    1 15-feb-06 300
    2 15-dec-06 111
    2 15-jan-06 222 --->
    2 01-fen-06 333
    If i specify the runtime parameter as JAN-06 the output of the report should be with 2 records indicated with arrows above.
    the query should pick up the record with the highest date for a specific customer.
    in the above example for customer "1" 10-jan-06 is highest date and for customer "2" 15-jan-06 is the highest date.
    hope the requirement is clear.
    thanks in advance

    SELECT custno, trn_dt, amount
    FROM TABLE
    WHERE (custno,trn_dt) IN
    (SELECT custno, MAX(trn_dt)
    FROM TABLE
    GROUP BY custno)
    There are many examples on this in SQL and PL/SQL forum.

  • Insert same data with next holiday date

    Hi All,
    I have write a pl block where in i need to copy the existing records from the
    table A to table A itself with date+1.
    Say for eg. there is a situation were daily one record is inserted into table A
    and there is a data column init but NO records for sat,sunday and holidays
    I need to write a block to insert records for sat,sun and holiday in the table A
    which rec? if rec is missing for say for eg date 04/May/2007 then I need to take
    records from 03/May/2007 and insert a new records by copying all the rec from previous date with data column in A as 04/May/2007.
    like wise there are lac of rec in table A and thousands of missing rec for sat,sun & holiday.
    I am trying to do this by taking cursor and finding out the missing rec and insert it.
    i have just started can any one of you help in this. by posting the best logic for this
    Thanks,
    AAK.

    Hi1
    pls try this --
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL>
    SQL> set lin 1000
    SQL>
    SQL> select * from emp_q;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7777 Avik       CLERK           7839 02-MAR-07       3456        263         30 M 12547896
          6666 prithwi    CLERK           7839 22-JUL-06       1234        248         30 M 14782563
          7639 Roni       CLERK           3434 17-DEC-80      12121                    50 F
          7499 ALLEN      SALESMAN        7469 20-FEB-81       1234        300         30 M
          7521 WARD       SALESMAN        7698 14-FEB-07       1234        500         10 F
          7566 JONES      MANAGER         7469 02-APR-81       1000                    10 F
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1234       1400         53 F
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20
          6194 Verona     CLERK           7839 30-APR-07       2365        125         30 F 12543698
          6698 Fereda     CLERK           7839 30-APR-07       2365        125         30 M 12543698
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          6903 Aliva      CLERK           7839 30-APR-07       2365        125         30 F 12543698
          7411 Naba       CLERK           7839 27-APR-07       1450        452         30   29631478
          7529 Indra      SALESMAN        7839 27-APR-07       5025        250         30 M 28963147
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M 23515485
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20   23651489
          7788 SCOTT      ANALYST         7566 19-APR-87       1234                    40 F 25483698
          7839 KING       PRESIDENT       7839 17-NOV-81       1234                    40 F 23691436
          7844 TURNER     SALESMAN        7698 08-SEP-81       1234          0         30 F 23459687
          7876 ADAMS      CLERK           7788 23-MAY-87       1234                    10 M 23984297
          7900 BARRY      CLERK           7698 03-DEC-81       1234        500         10 F 25983147
          7902 FORD       ANALYST         7566 03-DEC-81       1234                    40 F 29541236
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7934 MILLER     CLERK           7458 23-JAN-82       1234                    10 F 24893175
    23 rows selected.
    SQL>
    SQL>
    SQL> insert into emp_q
      2  select empno,ename,job,mgr,sysdate+1,sal,comm,deptno,code,phone
      3  from emp_q
      4  where empno = 7777;
    1 row created.
    SQL>
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from emp_q;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7777 Avik       CLERK           7839 02-MAR-07       3456        263         30 M 12547896
          6666 prithwi    CLERK           7839 22-JUL-06       1234        248         30 M 14782563
          7639 Roni       CLERK           3434 17-DEC-80      12121                    50 F
          7499 ALLEN      SALESMAN        7469 20-FEB-81       1234        300         30 M
          7521 WARD       SALESMAN        7698 14-FEB-07       1234        500         10 F
          7566 JONES      MANAGER         7469 02-APR-81       1000                    10 F
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1234       1400         53 F
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20
          6194 Verona     CLERK           7839 30-APR-07       2365        125         30 F 12543698
          6698 Fereda     CLERK           7839 30-APR-07       2365        125         30 M 12543698
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          6903 Aliva      CLERK           7839 30-APR-07       2365        125         30 F 12543698
          7411 Naba       CLERK           7839 27-APR-07       1450        452         30   29631478
          7529 Indra      SALESMAN        7839 27-APR-07       5025        250         30 M 28963147
          7698 BLAKE      MANAGER         7839 01-MAY-81       1234                    40 M 23515485
          7782 CLARK      MANAGER         7839 09-JUN-81       1234                    20   23651489
          7788 SCOTT      ANALYST         7566 19-APR-87       1234                    40 F 25483698
          7839 KING       PRESIDENT       7839 17-NOV-81       1234                    40 F 23691436
          7844 TURNER     SALESMAN        7698 08-SEP-81       1234          0         30 F 23459687
          7876 ADAMS      CLERK           7788 23-MAY-87       1234                    10 M 23984297
          7900 BARRY      CLERK           7698 03-DEC-81       1234        500         10 F 25983147
          7902 FORD       ANALYST         7566 03-DEC-81       1234                    40 F 29541236
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO C PHONE
          7934 MILLER     CLERK           7458 23-JAN-82       1234                    10 F 24893175
          7777 Avik       CLERK           7839 04-MAY-07       3456        263         30 M 12547896
    24 rows selected.
    SQL> Regards.
    Satyaki De.

  • How to Compare date with Current system date in XSLT mapping.

    Hello Experts
    In a XSLT mapping program, I hava a filed, ZZOB which is giving some date.
    which I need to compare with the current date.
    Condition-
    ZZOB is greater than current date or ZZOBLIG = NULL
    Then go further statements.
    how can i campare with the current date?
    Please help.
    Thanks
    Balaprasad

    This example may help:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:param name="currentDate"/>
        <xsl:variable name="firstDate" select="concat(substring($currentDate, 1,4),substring($currentDate, 6,2),substring($currentDate, 9,2))"/>
        <xsl:template match="/">
            <xsl:apply-templates select="//item"/>
        </xsl:template>
        <xsl:template match="item">
            <xsl:variable name="secondDate" select="concat(substring(submissionDeadline, 1,4),substring(submissionDeadline, 6,2),substring(submissionDeadline, 9,2))"/>
            <xsl:choose>
            <xsl:when test="$firstDate &gt; $secondDate">
                <xsl:call-template name="late"/>
                </xsl:when>
                <xsl:when test="$firstDate &lt; $secondDate">
                    <xsl:call-template name="ontime"/>
                </xsl:when>
                <xsl:when test="$firstDate = $secondDate">
                    <xsl:call-template name="same"/>
                </xsl:when>
                <xsl:otherwise>Monkeys<br /></xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template name="ontime">
            This is on time
        </xsl:template>
        <xsl:template name="late">
            This is late
        </xsl:template>
        <xsl:template name="same">
            This is on time
        </xsl:template>
    </xsl:stylesheet>

  • How to get the exact day date with the another date field?

    Hi,
    Please help me how to get the specific day of the week's date with the help of another date field.
    Actually , one field(week_day) has 1,2,3,4,5,6,7 here 1--MON,2-- TUE like that.
    another field has the date. based on that date, we have to go to that particular week and need to pick up the date by the above week_day. It should be in that week itself.
    Thanks in advance!!
    Regards,
    Vissu...
    Edited by: vissu on Oct 29, 2010 3:07 AM

    Hi,
    Something like this
    SELECT TRUNC(<DATE_COLUMN>,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the particular week of the date
    SELECT TRUNC(SYSDATE,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the current week
    cheers
    VT

  • UDF to compare the dates with the input date

    Hi,
    Help me in writing an UDF to compare the input date with start date and end date.
    I had written following UDF, but it is not working. we are on XI 3.0
    try {
                SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
                Date sd = df.parse(StartDate);
                Date id = df.parse(InputDate);
                Date ed = df.parse(EndDate);
                if ((sd.before(id) || (sd.equals(id))) && (ed.after(id)) || (ed.equals(id))) {
              return true;               
    else{
                    return false;
            }     catch (Exception e){
           e.printStackTrace();
    Thanks
    Srinivas

    Hello Srinivas,
    did you import this two classes in your UDF ?  java.text.* and java.util.*
    In case you did but the program is still not working I just wrote a code without imports. See if this might help. I have tested this with all type of data please test again from your end. I have assumed that if three dates are equal the function return true. I am not sure whether you wanted to exclude the boundary dates. In case you want to exclude those dates just replace '<=' with '<' symbol. The code could have been smarter but in short time I thought this might help.
    public class DateRange {
      static boolean compareDate(String startDate,String inputDate,String endDate)
              int j,k,l;
              String s[],i[],e[];          
              s=startDate.split("-", 3);
              i=inputDate.split("-", 3);
              e=endDate.split("-", 3);
              j=s[0].compareTo(i[0]);
              k=i[0].compareTo(e[0]);
              l=s[0].compareTo(e[0]);
              if(l>0|| j>0 || k>0)
                   return false;
              if(j<=0 && k<0)
                   return true;
              j=s[1].compareTo(i[1]);
              k=i[1].compareTo(e[1]);
              l=s[1].compareTo(e[1]);
              if(l>0|| j>0 || k>0)
                   return false;
              if(j<=0 && k<0)
                   return true;
              j=s[2].compareTo(i[2]);
              k=i[2].compareTo(e[2]);
              l=s[2].compareTo(e[2]);
              if(l>0|| j>0 || k>0)
                   return false;
              if(j<=0 && k<=0) 
                   return true;
                return false;
         public static void main(String[] args) {
              String startDate="1992-04-03";
              String inputDate="1992-02-03";
              String endDate="1992-02-03";
              System.out.println(compareDate(startDate,inputDate,endDate));
    Plese let me know if this works.
    regards
    Anupam

  • Control Sales order Pricing Date with Delivery GI Date

    Is it possible to have a control that ensures the Actual GI date in a delivery is not more than a number of days from the sales order pricing date?

    Hi,
    To have restriction in actual GI date in transaction VL01N . Please find the user exit for VL01N , you can use one which are marked as bold . Kindly take the help of abaper to put the validation or logic as required.
    V02V0001   - Sales area determination for stock transport order 
    V02V0002   - User exit for storage location determination 
    V02V0003   - User exit for gate + matl staging area determination 
    V02V0004   - User Exit for Staging Area Determination (Item) 
    V50PSTAT  - Delivery: Item Status Calculation 
    V50Q0001   - Delivery Monitor: User Exits for Filling Display Fields
    V50R0001    -  Collective processing for delivery creation 
    V50R0002    - Collective processing for delivery creation 
    V50R0004    - Calculation of Stock for POs for Shipping Due Date List
    V50S0001    - User Exits for Delivery Processing 
    V53C0001    - Rough workload calculation in time per item 
    V53C0002    - W&S: RWE enhancement - shipping material type/time slot
    V53W0001   - User exits for creating picking waves 
    VMDE0001  - Shipping Interface: Error Handling - Inbound IDoc 
    VMDE0002  - Shipping Interface: Message PICKSD (Picking, Outbound) 
    VMDE0003  - Shipping Interface: Message SDPICK (Picking, Inbound) 
    VMDE0004  - Shipping Interface: Message SDPACK (Packing, Inbound) 
    Hope this will help you to resolve your issue!!!!
    Regards,
    Krishna O

  • How to compare date with thr current date

    Hi,
    I have an inout string which is in date format(dd/mm/yyyy hh:mm:ss) .
    what i need to do is comparing this date string with the current date. if my input string is less than current date , then display error message..
    how to do this?
    regards

    Excellent suggestions from all of you people!
    finally i got the solution
    code is:
    import java.util.*;
    import java.text.*;
    public class TestDate {
      public static void main(String args[]){
        TestDate a = new TestDate();
      TestDate() {
        String DATE_FORMAT = "dd/MM/yyyy hh:mm:ss";
         Date today = new Date();
         Date myDate=null;
        java.text.SimpleDateFormat sdf =
             new java.text.SimpleDateFormat(DATE_FORMAT);
         try{
         myDate = sdf.parse("01/06/2006 00:00:00");
         }catch(Exception e) {System.out.println(e);}
        Calendar c1 = Calendar.getInstance();
        Calendar c2 = Calendar.getInstance();
        c1.setTime(today);
        c2.setTime(myDate1);
        System.out.print(sdf.format(today));
        System.out.print(sdf.format(c1.getTime()));
        if (c1.before(c2)) {
           System.out.print(" is before ");
        if (c1.after(c2)) {
           System.out.print(" is after ");    
        if (c1.equals(c2)) {
           System.out.print(" same as ");    
    System.out.print(sdf.format(c2.getTime()));
      }

  • Select multiple date with interval in date-navigator

    Hi,
    Is it possible to have a multiple date selection with interval in a date-navigator. When yes, how?
    Richard Middelburg

    Look at the below thread:
    Re: Date Navigator Challenge
    Raja T

  • I have too much digitization noise in my data for the range I've selected.

    I have a 16-bit DAQ card, but each digitization level is ~10 microVolts, instead of 1/(2^16) of my range. I set my range to be 1mV to -1mV. I'm getting data from a photodiode which its current is converted to voltage through a 100 kilo-ohm resistor.
    Thanks!
    Bethany

    Hi Bethany,
    The smallest input range of that DAQ Board is +/- 200mV. At that range, you can expect to get ~6.4 microVolts Resolution. This is discussed in much greater detail in the M Series User Manual:
    http://digital.ni.com/manuals.nsf/websearch/9477D6DF1FE5A72986256FAB00633DE4?opendocument
    Search for Analog Input Range, and it will be your second ranked item. This will show you how this resolution is calculated, and what it will be for your board.
    Have a Great Day!
    George

  • Data in dropdown list field are empty in PDF form

    Hi all.
    Viewing a pdf form created with SAP interactive Forms offline method, the data in the dropdown list field are empty.
    The data in the dropdown list field are generated by xml file produced by an abap report.
    The problem occurs opening the form with Adobe Reader 8.1 or higher. Using Adobe Reader release 7.0.9 everything is ok.
    Do you have any suggestion?
    Thanks in advanced.
    Best Regards.
    Moreno

    Hi Otto,
    the only release of Adobe Reader that work is 7.0.9. Release 8.1 and 9 have the same problem where the data in the dropdown list field are empty.
    At the end of the trace file in Adobe Reader 9.0.3 I find this error message:
    "Invalid version: The current version of the XFA template model exceeds the capability of Acrobat / Adobe Reader 7.0.5."
    The form has been created using Adobe Lifecycle Design 7.1.
    Any idea?
    Thanks
    Moreno

  • How to over-write iCal data with iPhone calendar data?

    As of tonight, my iPhone 4's calendar will not merge to my iMac.  The Mac with push to the phone, but not the other way around.  I know for a fact that the "correct" calendar is the one on the iPhone (lucky this week I know that!), so I'd like a way to over-write the computer version with the iPhone.
    So, problems to solve:
    (1) Tell me how to reset the sync history in the newest version of iTunes
    OR
    (2) Tell me how to over-write data as described above (and pray it works the next time bi-directionally)
    OR
    (3) Point me to a fix for the original non-sync problem that I haven't discovered yet.
    Your help is GREATLY appreciated as I've spent WAY more time on this than intended already.  1 minute sync --> 4 hour issue.
    Thanks!
    [iPhone 4 with 5.1 and Calendar; iMac with 10.6.8 and iCal 4.0.4]

    Greetings,
    Basics:
    Turn iPhone and computer off and on and try again.
    Ensure date and time on iPhone and computer are the same and try again.
    More troubleshooting:
    1.) Backup all your data:
    Backup your iPhone: http://support.apple.com/kb/HT1414
    Backup your computer Addressbook: http://docs.info.apple.com/article.html?path=AddressBook/4.0/en/ad961.html
    Backup your computer iCal: http://support.apple.com/kb/HT2966
    2.) Reset the computer's sync services and then restart the computer: http://support.apple.com/kb/TS1627
    3.) Plug in the iPhone and attempt a sync.
    If that does not resolve the issue let me know and I'll give you a different route.
    Hope that helps.

Maybe you are looking for

  • Adapter PrePopulate return value.

    Hi , I create a form field of type combo box, but I want to pre-populate it with values from my database, what must be the type of the return value for this case ? I´ve tried Map but doesn´t work. Thanks.

  • PERL CGI doesnt accept ORACLE+APACHE

    Hi, I am using Oracle+Apache+Perl+DBI/DBD and one thing very strange is happening: Oracle works fine ... Perl + CGI + Apache works fine ... Perl + Oracle works fine ... But when it comes to Access a Perl script (CGI) accessing Oracle in the Netscape

  • How to keep the report structures in all the report pages

    I need how to design the rdl surface, to keep the table headers displayed on all the generated reprot pages, Design: Please find the below id my report design, having 4 data tables bould to the tablix data region. Header_Region Top_Left_Table        

  • IPod shuffle not allowing me to hear the left earpiece

    I've tried three different earphones. When the earphones are completely plugged in, I cannot hear the left earpiece. When I pull the connector slightly out I am able to hear from the left earpiece, but then the right one stops working. Is there any w

  • Cannot make itunes 10.5 appear

    I use Windows 7 Professional 64-bit and I updated iTunes to the newest version, 10.5. It was only then when this problem occured when I open iTunes, but cannot make it appear on the screen even though it is on the Windows Task Manager list. Please he