![]() |
Last Friday of the month
I have in cell "A5" the last day of the month (i.e. las month was 08-31-08
and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying€¦ |
Last Friday of the month
Try
=DATE(YEAR(A1),MONTH(A1)+1,0)+MOD(-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-2,-7) With a date in a1 Mike "Alfredo_CPA" wrote: I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying€¦ |
Last Friday of the month
Try this:
=A5+1-WEEKDAY(DATE(YEAR(A$5),MONTH(A$5)+1,1)+1) -- Biff Microsoft Excel MVP "Alfredo_CPA" .(donotspam) wrote in message ... I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying. |
Last Friday of the month
=DATE(YEAR(A5),MONTH(A5)+1,1)- WEEKDAY(DATE(YEAR(A5),MONTH(A5)+1,2))
-- Regards, Peo Sjoblom "Alfredo_CPA" .(donotspam) wrote in message ... I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying. |
Last Friday of the month
It does the job perfectly
Thanks a lot!! "Mike H" wrote: Try =DATE(YEAR(A1),MONTH(A1)+1,0)+MOD(-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0),2)-2,-7) With a date in a1 Mike "Alfredo_CPA" wrote: I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying€¦ |
Last Friday of the month
Thanks Mr T.
Of all the responses this is the shortest fromula and I personally prefer that. Thanks to you Peo as well (all the responses works perfectly) "T. Valko" wrote: Try this: =A5+1-WEEKDAY(DATE(YEAR(A$5),MONTH(A$5)+1,1)+1) -- Biff Microsoft Excel MVP "Alfredo_CPA" .(donotspam) wrote in message ... I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying. |
Last Friday of the month
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "Alfredo_CPA" .(donotspam) wrote in message ... Thanks Mr T. Of all the responses this is the shortest fromula and I personally prefer that. Thanks to you Peo as well (all the responses works perfectly) "T. Valko" wrote: Try this: =A5+1-WEEKDAY(DATE(YEAR(A$5),MONTH(A$5)+1,1)+1) -- Biff Microsoft Excel MVP "Alfredo_CPA" .(donotspam) wrote in message ... I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying. |
Last Friday of the month
=A5+1-WEEKDAY(DATE(YEAR(A5),MONTH(A5)+1,1)+1)
We can reduce that further to: =A5+1-WEEKDAY(A5+2) -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... Try this: =A5+1-WEEKDAY(DATE(YEAR(A$5),MONTH(A$5)+1,1)+1) -- Biff Microsoft Excel MVP "Alfredo_CPA" .(donotspam) wrote in message ... I have in cell "A5" the last day of the month (i.e. las month was 08-31-08 and this month will be 09-30-08) I need a formula in "A6" (that works for every month) that gives me the last friday of that specific month based on the input on "A5" Thanks -- I'm not a looser, I keep trying. |
Last Friday of the month
Hi Biff,
What about =A5-MOD(A5+1,7) ? Regards, Bernd |
Last Friday of the month
Even better.
I don't think we'll get it any more compact than that! -- Biff Microsoft Excel MVP "Bernd P" wrote in message ... Hi Biff, What about =A5-MOD(A5+1,7) ? Regards, Bernd |
All times are GMT +1. The time now is 02:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com