Hi Antony, Assuming that the Header "Start date" is in Cell A1, please use the following formula in the "Category" column: =IF(AND(C2>=0,C2<=30),1,IF(AND(C2>=31,C2<=60),2,IF(AND(C2>=61,C2<=90),3,IF(AND(C2>=91,C2<=120),4,IF(C2>=120,5,"")))))
Please let me know if this helps or u need any further help on this. Regards, Andy On Sat, Aug 21, 2010 at 11:36 AM, Antony <tonycrazy...@gmail.com> wrote: > Hi Experts, > > Could anyone help me to have difference between two dates into > different categories. > For eg: > > Start date End date Difference Category > 6/6/2010 9/6/2010 92 4 > > Categories Values > 0-30 1 > 31-60 2 > 61-90 3 > 91-120 4 > >120 5 > > > Thanks in advance, > Antony > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 7000 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group at > http://groups.google.com/group/excel-macros/subscribe > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe