ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   changing date (https://www.excelbanter.com/excel-worksheet-functions/123379-changing-date.html)

hans

changing date
 
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

Muhammed Rafeek M

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


Bob Phillips

changing date
 
=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)


"Hans" wrote in message
...
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





All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com