Calculate the closest day

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Try this formula

=TODAY()+CHOOSE(WEEKDAY(TODAY()),-2,-3,3,2,1,0,-1
 
perfect

CLR said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top