Forum Discussion
MSTwork
Mar 06, 2020Copper Contributor
Excel Formula help, IFS function
I am trying to write an IFS statement to determine if a date falls within a certain date range. Date Range: is in Sheet 2 (see below) A B C 1 FY18 7/1/2017 6/30/2018 2 FY19 7/...
MSTwork
Mar 06, 2020Copper Contributor
My original formula is working, however it only returns the result "FY18" even if the date falls in one of the other fiscal years.
SergeiBaklan
Mar 06, 2020Diamond Contributor
- MSTworkMar 09, 2020Copper Contributor
- SergeiBaklanMar 09, 2020Diamond Contributor
MSTwork , you are welcome
- wsantosMar 06, 2020Brass Contributor
SergeiBaklan that's another way to do it, but the vlookup also works, or better yet, the new xlookup - no need to move the columns around:
=XLOOKUP(H21,B1:B3,A1:A3,"N/A",-1)
You only need to compare one column.
- SergeiBaklanMar 06, 2020Diamond Contributor
Yes, correct, but that's only if the date is in defined financial years. If search for date from future, e.g in year 2022, such formula returns FY20 for our sample.
By the way, I don't see why in such case XLOOKUP is better than simple LOOKUP
=LOOKUP(I22,Sheet2!$B:$B,Sheet2!$A:$A)