Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account

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