![]() |
from date return week date range
I have a date in a cell. How can I return the value of the monday before and
the friday after that date? Example: input: 01/25/2007 (in this case a thursday) output: 01/22/2007 - 01/26/2007 (monday - friday of above week) Thanks in advance for any help! -- ERahn |
from date return week date range
Hi
Try =TEXT(A1-WEEKDAY(A1)+2,"dd/mm/yyyy")&" - "& TEXT(A1-WEEKDAY(A1)+6,"dd/mm/yyyy") -- Regards Roger Govier "ERahn" wrote in message ... I have a date in a cell. How can I return the value of the monday before and the friday after that date? Example: input: 01/25/2007 (in this case a thursday) output: 01/22/2007 - 01/26/2007 (monday - friday of above week) Thanks in advance for any help! -- ERahn |
from date return week date range
on A8 : your date. =TEXT(A8+LOOKUP(WEEKDAY(A8),{1,2,3,4,5,6,7},{1,0,-1,-2,-3,-4,-5}),"mm/dd/yyyy")&"-"&TEXT(A8+LOOKUP(WEEKDAY(A8),{1,2,3,4,5,6,7},{5,4, 3,2,1,10,-1}),"mm/dd/yyyy") sunday is the 1st day of the week range (of a date). result should display the date of monday-friday. happy holidays..... "ERahn" wrote: I have a date in a cell. How can I return the value of the monday before and the friday after that date? Example: input: 01/25/2007 (in this case a thursday) output: 01/22/2007 - 01/26/2007 (monday - friday of above week) Thanks in advance for any help! -- ERahn |
from date return week date range
Roger and driller,
These both work great--you're my heroes! Thank you so much for the help, ERahn "ERahn" wrote: I have a date in a cell. How can I return the value of the monday before and the friday after that date? Example: input: 01/25/2007 (in this case a thursday) output: 01/22/2007 - 01/26/2007 (monday - friday of above week) Thanks in advance for any help! -- ERahn |
All times are GMT +1. The time now is 02:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com