Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with dates
Hi all
I am wondering if there is a code that I can put in to automatically place in a cell the date of the previous Tuesday. i.e. 22 feb was the last tuesday. Thanks in advance Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with dates
This worksheet formula will calculate the previous tuesday:
=TODAY()-CHOOSE(WEEKDAY(TODAY(),1),5,6,7,1,2,3,4) If you need to convert to a value instead of the formula, you can create code to calculate this and then store the value in the cell: Range(DateCell).Value = Date() - Choose(Weekday(Date()),5,6,7,1,2,3,4) "Greg B..." wrote: Hi all I am wondering if there is a code that I can put in to automatically place in a cell the date of the previous Tuesday. i.e. 22 feb was the last tuesday. Thanks in advance Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with dates
Thanks for the help
Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking computer dates (time) to spreadsheet dates that have formu | Excel Worksheet Functions | |||
Stop dates from showing as numbers - when formated as dates | Excel Discussion (Misc queries) | |||
Toggle a range of Julian dates to Gregorian Dates and Back | Excel Programming | |||
Identifying unique dates within a range of cells containing dates | Excel Discussion (Misc queries) | |||
Charting data against dates where dates are not at fixed intervals | Charts and Charting in Excel |