• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

If condition

I have an excel sheet where difference between two dates is given in tenure column. Now I want to make a slab that if somebody has worked for less than 1 year it will be zero. If somebody worked for 2 years he will 1-2 years slab. If somebody worked for 3 Years he will be in 2-3 years slab. and if he has worked for more than 3 years he will be in >3 years slab. Please help .



New Member
Arup Dutta Chowdhury, Good afternoon.

Try to use:

E2 --> =IF(--LEFT(D2;1)>3;">3 years";IF(--LEFT(D2;1)=3;"2-3 years";IF(--LEFT(D2;1)>=1;"1-2 years";0)))

Please, tell us if it worked as you desire.

I hope it helps.


Peter Bartholomew

Well-Known Member
Using Excel 365, columns C and D could read
= DATEDIF(joined, left,"y")  & "Year" &
  DATEDIF(joined, left,"ym") & "Months"

    0, "zero",
    1, "1-2 years",
    2, "2-3 years",
       ">3 years" )