Thread: changing date
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Muhammed Rafeek M Muhammed Rafeek M is offline
external usenet poster
 
Posts: 179
Default changing date

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.


"Hans" wrote:

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