#### Topic: The maximum value on a condition

Hello!

Microsoft Excel 2013 is used.

There is a table on +SKU+.

[spoiler the Table] a TT, SKU, Date, The Price, The Ceiling price for current and last month, The Ceiling price for current and 2 last months

1, SKU1, 01.02.2018, 150, 150, 150

1, SKU1, 09.02.2018, 140, 150, 150

1, SKU1, 19.02.2018, 120, 150, 150

1, SKU1, 06.03.2018, 130, 150, 150

1, SKU1, 26.03.2018, 120, 150, 150

1, SKU1, 02.04.2018, 110, 130, 150

1, SKU1, 08.04.2018, 105, 130, 150

1, SKU1, 17.04.2018, 90,130, 150

1, SKU1, 01.05.2018, 85, 110, 130

1, SKU2, 01.02.2018, 150, 150, 150

1, SKU2, 09.02.2018, 140, 150, 150

1, SKU2, 19.02.2018, 120, 150, 150

1, SKU2, 06.03.2018, 130, 150, 150

1, SKU2, 26.03.2018, 120, 150, 150

1, SKU2, 02.04.2018, 110, 130, 150

1, SKU2, 08.04.2018, 105, 130, 150

1, SKU2, 17.04.2018, 90, 130, 150

1, SKU2, 01.05.2018, 115, 115, 130

[/spoiler] I Try to write function in excel for fields ** the Ceiling price for current and last month ** and ** the Ceiling price for current and 2 last months **. For the total it turns out, and for - is not present.

Tell, how in excel to register the formula for this field?