# formula to search a range

1. ## formula to search a range

Hi Folks,

I am in need of your assistance.

I have a table with columns January to December with rows for the years starting 2012 to 2023.

At the intersection of the column and rows there is a number.

What I would like to do is the following:

If the input month is Jan 2013 then I would like the formula to provide the value found under column (Jan) row (2013) and place that value in the cell?

I hope this is not too complicated

I look forward to your replies

2. ## Re: formula to search a range

Hi use this,

Where \$B\$1:\$M\$1 ={"January","February","March","April","May","June","July","August","September","October","November","December"}

\$A\$2:\$A\$10={2012;2013;2014;2015;2016;2017;2018;2019;2020}

Formula:
`Please Login or Register  to view this content.`

3. ## Re: formula to search a range

but would this formula not just give you the search only for the year 2014 and month Mar?

If Changed the month to April the formula would then have to be different ?

4. ## Re: formula to search a range

or, assuming table in same place as above and search item in N1
Formula:
``Please Login or Register  to view this content.``

5. ## Re: formula to search a range

You can directly reflect the cells instead of 2014 & MAR

=INDEX(\$B\$2:\$M\$10,MATCH(Z1,\$A\$2:\$A\$10,0),MATCH(Z2,\$B\$1:\$M\$1,0))

6. ## Re: formula to search a range

thanks for the reply, I will try this option

7. ## Re: formula to search a range

Thanks pjwhitfield - your help was perfect