changing date

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

Guest

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
 
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.
 
=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)
 

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