![]() |
Calculate the closest day
Hello,
I am creating a time card. I would like a formula that will calculate (show) Fridays date closest to the date when the spreadsheet is opened. For example If I opened the sheet today the formula would populate yesterdays date. If I opened the sheet on Tuesday, the sheet formula will populate next Fridays date, etc€¦ Thanks |
Calculate the closest day
Assuming the date of the sheet opening is in A1.....
=TEXT(A1+LOOKUP(WEEKDAY(A1),{1,2,3,4,5,6,7},{-2,-3,3,2,1,0,-1}),"mm/dd/yyyy dddd") Vaya con Dios, Chuck, CABGx3 "Jim" wrote in message ... Hello, I am creating a time card. I would like a formula that will calculate (show) Fridays date closest to the date when the spreadsheet is opened. For example If I opened the sheet today the formula would populate yesterdays date. If I opened the sheet on Tuesday, the sheet formula will populate next Fridays date, etc. Thanks |
Calculate the closest day
Try this formula =TODAY()+CHOOSE(WEEKDAY(TODAY()),-2,-3,3,2,1,0,-1) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=501413 |
Calculate the closest day
perfect
"CLR" wrote: Assuming the date of the sheet opening is in A1..... =TEXT(A1+LOOKUP(WEEKDAY(A1),{1,2,3,4,5,6,7},{-2,-3,3,2,1,0,-1}),"mm/dd/yyyy dddd") Vaya con Dios, Chuck, CABGx3 "Jim" wrote in message ... Hello, I am creating a time card. I would like a formula that will calculate (show) Fridays date closest to the date when the spreadsheet is opened. For example If I opened the sheet today the formula would populate yesterdays date. If I opened the sheet on Tuesday, the sheet formula will populate next Fridays date, etc. Thanks |
All times are GMT +1. The time now is 01:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com