ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Excel query help



  1995 Mondeo Speed Machine
I’ve got a basic Excel macro which runs a select query on a Datasource and dumps the result into the worksheet. One of the fields it picks up is a date field. Does anyone know how I can amend the code so that it will only bring back entries where the date field entry is from the last 30 days?

I’ve had a look round on the net for help without much success.

Cheers in advance

Ric
 
  Clio DCi 65
Is there not a range thing on there at all when you can select say

Date - 31 Days?

Havn't used Excel in ages, hope this helps at all?!
 
  cock mobile.
Why not just pull across all the data and then filter out anything older than 30 days?

Would be easier.
 
For intCounter = 2 To 9999
strCell = "AB" & intCounter
If Date + 31 = Range(strCell) Then
strRange = "A" & intCounter & ":AB" & intCounter
Range(strRange).Select
Selection.Copy
 


Top