# Need Help with Indirect/Match formula

#### odonovanc

##### New Member
I have a workbook with many tabs. One set of tabs are years, 2020, 2021, etc. Then I also have tabs for each month of the years so Mar 2021, Apr 2021, etc.

I am trying to create a lookup where a formula will look up the correct month tab, in this case Mar 2021. Here is my formula and where I am:

=-IFERROR((IFERROR(VLOOKUP(\$C64,INDIRECT(M\$62&"!\$C\$5:\$T\$50000"),MATCH(M\$61,INDIRECT(M\$62&"!\$C\$4:\$T\$4"),0),0),0)),"")

Some details: in my current sheet, M61 is the month "Mar" and M62 is the Year "2021". I need my formula to lookup C64 from my current sheet to the Mar 2021 tab and match the month found in cell M61 to row 4 of the Mar 2021 tab.

My formula is pulling in the amounts from just the "2021" tab and not the Mar 2021 tab like I am trying to do. Everything is pulling correctly, it is just pulling from the wrong sheet. How can I tweak this to get it to pull from Mar 2021 tab instead of just 2021?

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### KRice

##### Well-known Member
This part of your formula is telling VLOOKUP to look only at the 2021 sheet.
Excel Formula:
``INDIRECT(M\$62&"!\$C\$5:\$T\$50000")``
If you want this to refer to the Month-Year tab, then:
Excel Formula:
``INDIRECT("'"&M\$61&" "&M\$62&"'!\$C\$5:\$T\$50000")``
Note the character nested between those double quotes is a single quote " ' " without the spaces...and the 2nd occurrence is " ' ! again without spaces.
That forms the string 'Mar 2021'!\$C\$5:\$T\$50000. Your other INDIRECT formula may need attention too.

#### odonovanc

##### New Member
This part of your formula is telling VLOOKUP to look only at the 2021 sheet.
Excel Formula:
``INDIRECT(M\$62&"!\$C\$5:\$T\$50000")``
If you want this to refer to the Month-Year tab, then:
Excel Formula:
``INDIRECT("'"&M\$61&" "&M\$62&"'!\$C\$5:\$T\$50000")``
Note the character nested between those double quotes is a single quote " ' " without the spaces...and the 2nd occurrence is " ' ! again without spaces.
That forms the string 'Mar 2021'!\$C\$5:\$T\$50000. Your other INDIRECT formula may need attention too.
This is perfect. Thanks so much.

#### KRice

##### Well-known Member

Replies
5
Views
80
Replies
10
Views
349
Replies
5
Views
178
Replies
17
Views
241
Replies
3
Views
119

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,151,842
Messages
5,766,738
Members
425,376
Latest member

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back