Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Month & year question
hello,
I have the following formula which works fine; =IF(AND(L$1=data!$K2, L$1<=data!$H2), (IF(MONTH(L$1)=MONTH(data!$K2),$F2,data!$I2/data!$G2)),"") I need to change it so that the bit (IF(MONTH(L$1)=MONTH(data!$K2) checks that a date matches not only the month but the year also (i dont need to match the day). I tried this; - but excel says that it contains an error! =IF(AND(L$1=data!$K2, L$1<=data!$H2), (IF(MONTH(L$1),(YEAR (L$1))=(MONTH(data!$K2)),(YEAR (L$1)),$F2,data!$I2/data!$G2)),"") Any ideas how I can correct (IF(MONTH(L$1),(YEAR (L$1))=(MONTH(data!$K2)),(YEAR (L$1)) to work? many thanks rgb |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to insert month date year and day of week | New Users to Excel | |||
how to insert month date year and day of week | Excel Worksheet Functions | |||
Locate month and year from range of date from another sheet | New Users to Excel | |||
Excel leap year question | New Users to Excel | |||
counting date entries by month & year | Excel Worksheet Functions |