changing date

H

Hans

IF function is true, need to change date from another cell,eg 28-07-06, to
last friday of the next month,eg,25-08-06
 
M

Muhammed Rafeek M

u can use this formula:

=IF(A1=B1,IF(OR(MONTH(B1)=1,MONTH(B1)=7),DATE(YEAR(B1),MONTH(B1)+1,28)-(MAX(0,WEEKDAY(DATE(YEAR(B1),MONTH(B1)+1,28),2)+2)),DATE(YEAR(B1),MONTH(B1)+1,35)-(MAX(0,WEEKDAY(DATE(YEAR(B1),MONTH(B1)+1,35),2)+2))),"NO")

Cell A1 is one date
Cell B1 is other date
comparing A1=A2
if it is true, then u well get the answer: last friday of the next month of
B1 cell.

Please do rating.
 
B

Bob Phillips

=DATE(YEAR(A1),MONTH(A1)+2,1)+1-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+2,1)+2)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
Top