Forum Discussion

VikkiJ's avatar
VikkiJ
Copper Contributor
Nov 19, 2019

I need a IFS statement for it to compare dates. If A2 less than 1 year then X If a2 more than 1 yea

need a statement that will look at a cell and determine the following

 

less then 1 yr then put a 1

more than 1 less then 3 put a 2
more than 3 less then 4 put a 3

more than 4 less then 5 put a 4

more then 5 less then 6 put a 5

more than 6 less then 7 put a 6

more then 7 less then 8 put a 7

equal to or more then 8 put an 8

5 Replies

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    The Boolean alternative would be:
    =INT(A1)+
    (A1<2)-
    INT(A1-8)*
    (A1>=9)
  • macrordinary's avatar
    macrordinary
    Brass Contributor

    I think what you're looking for is something like this:

    =MIN(ROUNDUP(DAYS(end_date,start_date)/365,0),8)

  • PReagan's avatar
    PReagan
    Bronze Contributor

    Hello VikkiJ,

     

    That could be:

    =IF(A1<1,1,IF(A1<3,2,IF(A1<4,3,IF(A1<5,4,IF(A1<6,5,IF(A1<7,6,IF(A1<8,7,IF(A1>=8,8,""))))))))

Resources