Nested IF Formula from IFS

Justijb

New Member
Joined
Aug 16, 2016
Messages
43
Hello,

Might be an easy fix for you Excel experts but I can't seem to get the nested IF formula to return the results I need. The formula would look at number of days and return text as below:

Convert the following IFS formula:

IFS($AL13<=365,"Within One Year",AND($AL13>365,$AL13<=730),"Within Two Years",AND($AL13>730,$AL13<=1095),"Within Three Years",AND($AL13>1095,$AL13<=1825),"Within Five Years",$AL13>1825,"More than Five Years")

to a nested IF formula (tried):

=IF($AL13<=365,"Within One Year",IF($AL13>365,$AL13<=730,"Within Two Years",IF($AL13>730,$AL13<=1095,"Within Three Years",IF($AL13>1095,$AL13<=1825,"Within Five Years",IF($AL13>1825,"More than Five Years")))))

Cell AL13 would be a calculation of dates with return/output in count of days. Tried using AND & IF function after IF statement, which works but only gives me the negative values as "Within One Year" correctly, remaining results are #VALUE

Please advise.

Thank you.

-J
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
How about
=IF($AL13<=365,"Within One Year",IF($AL13<=730,"Within Two Years",IF($AL13<=1095,"Within Three Years",IF($AL13<=1825,"Within Five Years","More than Five Years"))))
 
Upvote 0
Hey try this:

Code:
IF($AL13=0,"",IFERROR(CHOOSE(ROUNDUP($AL13/365,0),"Within One Year","Within Two Years","Within Three Years","Within Five Years","Within Five Years"),"More than Five Years"))
 
Last edited:
Upvote 0
Try this:

IF(AL13<=365,"Within One Year",IF(AL13>1825,"More than Five","Within "&LOOKUP(AL13,{366,731,1096,1826},{"Two","Three","Five"}))&" Years")
 
Upvote 0
Try this:
IF(AL13<=365,"Within One Year",IF(AL13>1825,"More than Five","Within "&LOOKUP(AL13,{366,731,1096,1826},{"Two","Three","Five"}))&" Years")


I put an unnecessary value, it should be like this:

=IF(AL13<=365,"Within One Year",IF(AL13>1825,"More than Five","Within "&LOOKUP(AL13,{366,731,1096},{"Two","Three","Five"}))&" Years")
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top