Link to home
Start Free TrialLog in
Avatar of hkgal
hkgal

asked on

Excel counting month difference

Hey experts,

I have a Excel like:

join date      Jan 2009  Feb 2009 ........Mar 2012
2008/1/5          1               1                           1
2010/4/10                                                      1

formula inside =if(or(month(a2)<=month(b2), year(a2)<year(b2)),1,"")

that is, if the column heading date is larger than join date, 1 will be shown. and it works well

now I would like in another worksheet in same setting to set if the column heading date > join date for 6 months, 1 will be shown, else is ""

I try many times but fail........help...................
Avatar of kgerb
kgerb
Flag of United States of America image

How about this?  My join date starts in A2 and my column headings start in B1.

=IF(SUMPRODUCT(--(OFFSET(I1,0,-6,1,6)>$A$2))=6,1,"")

Kyle
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hkgal
hkgal

ASKER

very good!