Logic function

IFS

Work down the bands in order.

Purpose

Work down a list of bands and stop at the first that holds

Returns

The answer paired with the first test that comes out TRUE

Syntax

=IFS(test1, answer1, [test2], [answer2], ...)

ArgumentRequiredWhat goes here
test1RequiredThe narrowest band, checked first.
answer1RequiredWhat to show when that first test holds.
test2OptionalThe narrowest band, checked next.
answer2OptionalWhat to show when that next test holds.

How to use IFS

IFS takes tests and answers in pairs. It checks them in the order you wrote them and returns the answer beside the first test that holds, then stops.

Because it stops at the first match, the order is the whole design. An ageing band has to run from the widest to the narrowest, or every row falls into the first bucket.

There is no otherwise slot. The way to write one is a final pair whose test is TRUE, which always holds and so catches everything left.

Without that catch-all, a row matching none of the tests gives an error rather than a blank.

Examples

Every result below is worked out by the same evaluator that marks your answers, on the sheet shown here.

Payables ageing — October.xlsxSheet1
Harbour Foods payables at 31 October 2026, with supplier terms alongside
ABCDEFGH
1InvoiceSupplierStatusDays overdueAmountSupplierTerms (days)
2INV-8801Brightwell PaperOverdue12940Ashgrove Catering30
3INV-8802Calder UtilitiesQueried471180Brightwell Paper30
4INV-8803Meridian FreightOverdue632450Calder Utilities14
5INV-8804Ashgrove CateringOn terms0405Meridian Freight45
6INV-8805Brightwell PaperOverdue38760Thornbury Print60
7INV-8806Thornbury PrintOverdue911320
8INV-8807Meridian FreightOn terms0580
9INV-8808Calder UtilitiesOverdue24215
FormulaResult
=IFS(D7>90,"90+",D7>60,"61-90",D7>30,"31-60",TRUE,"Current")Ninety-one days. The first test holds, so nothing after it is looked at.90+
=IFS(D6>90,"90+",D6>60,"61-90",D6>30,"31-60",TRUE,"Current")Thirty-eight days falls past the first two tests and lands on the third.31-60
=IFS(D2>90,"90+",D2>60,"61-90",D2>30,"31-60",TRUE,"Current")Twelve days matches no band, so the TRUE catch-all answers.Current
=IFS(D7>30,"31-60",D7>60,"61-90",D7>90,"90+")The same row with the bands in the wrong order. Ninety-one days is reported as 31-60, and nothing about the formula looks broken.31-60

Notes

  • Every test needs an answer beside it. An odd number of arguments is an error.
  • A row that matches no test returns an error. Finish with TRUE and the answer you want for everything else.
Practise IFS in Unit 17

A reference tells you what it does. A unit makes you use it.