Query: Current week selection

sabrecoach

New Member
Joined
Mar 6, 2003
Messages
17
Hi everyone

Stuck in 35cm of snow but still working. :confused: I would like to know what formula would I have to put in a query to select records that are in the current week that starts on monday.

Here's an example. with dates and invoices numbers. I want to have the invoice that were produce this week (i.e. we're dec. 16th)

05/12/08 A12459
05/12/09 A12460
05/12/12 A12461
05/12/12 A12462
05/12/12 A12463
05/12/14 A12464

Results should be between A12461 and A12464

Thanks

Patrice
MTL, Canada
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Is it Monday to Friday?

Try this for the criteria for the date.

Between DateAdd("d",2-Weekday(Date()),Date()) And DateAdd("d",7-Weekday(Date()),Date())
 
Upvote 0
Hi Norie,

Thanks a lot :biggrin:

It's from monday to friday. My access is in french, I had a hard time finding the right syntax, but now it seem to work.

Could you explain me something?

2-Weekday(Date()),
7-Weekday(Date()),

What are the first digit stand for? I'm curious

Patrice
 
Upvote 0
Patrice

There's actually an error 7 should be 6.

They just represent days of the week.

2 I think is Monday and 6 Friday.

So the calculations just work out how many days to subtract to get Monday's date (4) and how many days to add to get Friday's date (0).
 
Upvote 0

Forum statistics

Threads
1,214,568
Messages
6,120,278
Members
448,953
Latest member
Dutchie_1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top