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
 

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,086
Office Version
  1. 365
Platform
  1. Windows
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())
 

sabrecoach

New Member
Joined
Mar 6, 2003
Messages
17
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
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,086
Office Version
  1. 365
Platform
  1. Windows
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).
 

Watch MrExcel Video

Forum statistics

Threads
1,119,129
Messages
5,576,263
Members
412,710
Latest member
Maged elmasry
Top