Select a Cell based on 2 other cell values

I have a sheet with Month and Year columns, as well as cells that have calculate the current month and year for various formulas.
I’m trying to select a certain cell based on the current month and year (so the month column = current month and year column = current year.

N2: Current Year Number (calculated) - 2024
N3: Current Month Number (calculated) - 04

A B C
1 Month Year Data
2 12 2023 35
3 01 2024 20
4 02 2024 23
5 03 2024 32
6 04 2024 37
etc. etc. etc.

So I want to select the value of C where A = Current Month and B = Current Year
(so in this case C6 to match A6 = 04 and B6 = 2024).

I’ve never delved much into the various fancy lookup and search functions so I’m a bit lost on this one. :slight_smile:

Thanks!

Welcome!

This may be correct - they can be used in this task, but it is not at all necessary
You can easily get the desired number 37 using the MAXIFS() function:

=MAXIFS($C$2:$C$99;$B$2:$B$99;YEAR(TODAY());$A$2:$A$99;MONTH(TODAY()))
A problem may arise if the values in columns A and B are not numbers but text (a leading zero in the month number casts doubt on this). Do you have numbers there?

1 Like

Yep that did it!
Thanks!