Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

sorting date....urgent pls help

  • Please log in to reply



    New Member

  • Member
  • Pip
  • 5 posts

I have got an array filled with names and date as shown below.

bell 2-Jun-05
bell 5-Jun-05
mac 3-Jun-05
april 6-Jun-5

How do i only pick the names which is closet to the current date?

I am using excel and Visual Basic.
  • 0




    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,528 posts
Hi sand

If you are using VB6 or greater, I would suggest that you create a recordset where the records are no greater than todays date. Then I would select the record/s that are the maximum date in the recordset. Check out info on using ADO.

If you are using VBA in Excel, then record a macro that filters the data no greater than todays date, and then select the maximum date. Have a look at the code and see what you can come up with.

Play around with the code yourself first. If you still have problems then post what you have developed and you shall be assisted from there. :tazz:

  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP