Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a column called as Month, and this column contains only Month details
in mmm/yy formate, i need to use the IIF function for some reason, if the month is current month(Jan/09) and previous month(Dec/08) the result should be YES, If its prior to current and previous months(oct/08, nov/08) the result should be NO |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ranjit,
If your 'Months' are actually formatted dates, then use something like =IF(AND(A2<=DATE(YEAR(NOW()),MONTH(NOW())+1,0),A2 =DATE(YEAR(NOW()),MONTH(NOW())-1,1)),"YES","NO") HTH, Bernie MS Excel MVP "Ranjit kurian" wrote in message ... I have a column called as Month, and this column contains only Month details in mmm/yy formate, i need to use the IIF function for some reason, if the month is current month(Jan/09) and previous month(Dec/08) the result should be YES, If its prior to current and previous months(oct/08, nov/08) the result should be NO |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ranjit,
Try (watch for the line wrap): =IF(AND(YEAR(D2)=YEAR(TODAY())-1,OR(MONTH(TODAY())-MONTH(D2)=0,MONTH(TODAY())-MONTH(D2)=-11)),TRUE,FALSE) ....Where D2 holds your date, then copy down. I have assumed that your dates although displaying in mmmm/yy format, do hold real dates. HTH Bob "Ranjit kurian" wrote in message ... I have a column called as Month, and this column contains only Month details in mmm/yy formate, i need to use the IIF function for some reason, if the month is current month(Jan/09) and previous month(Dec/08) the result should be YES, If its prior to current and previous months(oct/08, nov/08) the result should be NO |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
current week, current month, current year | Excel Programming | |||
Subtract a future month from the current month to get remaining m. | Excel Worksheet Functions | |||
Retrieve data for previous 3, 6, 12 month given current month | Excel Worksheet Functions | |||
copy worksheet from previous month and rename to current month | Excel Programming | |||
User defined function to count pay days in current month. | Excel Programming |