Friday, November 13, 2009

Excel date formula - find next monday from given date?

i have random dates down the a column and i have to put in a new column the date that will be the next monday from that date, then in the next column i need to put th


e next friday from that date


AND the friday from the same week





1. the next monday from the given date


2. friday from the same week


3.friday from the next week





thoughs are the only parts i have left to do thanks for anyhelp

Excel date formula - find next monday from given date?
Okay, here you go:





1. the next monday from the given date





In the cell where you want the date to appear, enter this formula:


=A1+(7-WEEKDAY(A1,2)+1) where A1 is the cell containing your manually entered date.





2. friday from the same week


=A1+(4-WEEKDAY(A1,2)+1)





3.friday from the next week


=A1+(11-WEEKDAY(A1,2)+1)





This was a fun one! To test it, I added some columns to tell me what the day of the week was (Mon-Sun), and then another to tell me the day of the week from my formula. Checked out good.
Reply:well, the way I see it'll be a long if formula or you can use a lookup table. First you need to use the weekday function to determine which day of the week the date in question falls on. So, if you're using an if function it'll look somthing like:


IF (Weekday(A1)=7, B1=B1+1, IF(Weekday(A2)=6,B1=B1+2, etc...





and you'll continue like that through the days of the week, and that'll give you the next monday.


No comments:

Post a Comment