+ Reply to Thread
Results 1 to 4 of 4

Date Issues

  1. #1
    Registered User
    Join Date
    10-04-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    77

    Date Issues

    Hi

    Please find attached a test spreadsheet I'm working on.

    There's a sheet called data which stores payments made, the date it was made, who made it and how much the payment was.

    The 2nd sheet is a report. If you click on the generate report button and put in your from and to dates, it is meant to only show payments made for that date range.

    You click the generate report button and it displays a userform.
    If I type in from as 01/06/2010 and to as 10/06/2010 and click on the generate report button, it shows the report page.

    It is flipping the date around to "06/01/2010" to "06/10/2010".
    I then convert the date to text string so it gives a string of numbers.

    The search works fine based on the number string, so ideally what I want is for excel NOT to change this to 06/10/2010 but keep it as 10/06/2010.

    If I change the cell to "text" instead of "date" it will not convert the date to numbers and hence my search does not work whatsoever.

    How can I stop excel flipping the date around???? It is REALLY frustrating me!!!

    Thanks in advance
    Attached Files Attached Files
    Last edited by Smurlos; 08-08-2010 at 08:30 PM.

  2. #2
    Registered User
    Join Date
    10-04-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Date Issues

    Is there a way I can convert the date in the input boxes in the macro to the 40xxx number directly via the macro rather than inputting into excel and then getting excel to do this as this would avoid mixing up the formats?

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date Issues

    I would have thought a PivotTable would be better than VBA
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    10-04-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Date Issues

    Don't worry, I worked it out in the end.

    Please Login or Register  to view this content.
    I've then had to store all my dates in serial in the database and do a search that way and then just convert from serial to date when a formatted date is needed.

    The reason i can't use pivot tables is it's for work colleagues who are not very computer friendly. They need a simple system where they type a date in this box, a date in this box, click and it prints out a report that's easy to read and understand.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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