# Vlookup Indirect?

#### fanboy

##### Board Regular
Hi all

I'm sure this is a pretty simple question but I cant seem to get my head round the answer.

I want to use VLOOKUP to search for values on various tabs in a workbook. I want the tab that is searched to be conditional on the contents of a cell on the summary tab. I have the following formula

=IF(BVA!O\$13>0,SUMIF(BVA!\$D:\$D,'Spend v budget'!\$B3,BVA!O:O),IF('CB May'!\$J\$4>0,SUMIF('CB May'!\$H:\$H,'Spend v budget'!\$D3,'CB May'!\$J:\$J)-SUMIF('CB May'!\$H:\$H,'Spend v budget'!\$D3,'CB May'!\$I:\$I),SUMIF('Cash forecast'!\$B:\$B,'Spend v budget'!\$B3,'Cash forecast'!J:J)))

I want all references to 'CB May' to be whatever the contents of cell M1 are.

Can anyone help?

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
well it's OK to use INDIRECT but it should specify the whole reference, not only the sheet name:
INDIRECT("'"&M1&"'!\$J\$4")

If the data is in the same location on each tab I know this can be done (See Mr Excel on Youtube) Vlookup on multiple tabs

Seems that your formulas would work, just need to add the vlookup, but you are using SUMIF so I am not sure what your trying to use the Vlook up for.

if your sheet tabs are consecutive, say sheet 1 through to sheet 3, you can reference them all in a formula by holding down the shift key after you've selected the data on sheet 1, then clicking sheet 3. in the below example the same datas housed in the same cells on the 3 sheets

Excel Workbook
C
215
315
415
515
615
7225
Sheet1

Yes thats what the video was about, multiple SHeets.

You can also create 2 tabs, Start and End tab, then any tabs inserted in the range will always be included.

=SUM(StartSheet:EndSheet!C2:C6)

Just to make it clear for you:
=IF(BVA!O\$13>0,SUMIF(BVA!\$D:\$D,'Spend v budget'!\$B3,BVA!O:O),IF(INDIRECT("'"&M1&"'!\$J\$4")>0,SUMIF(INDIRECT("'"&M1&"'!\$H:\$H"),'Spend v budget'!\$D3,INDIRECT("'"&M1&"'!\$J:\$J"))-SUMIF(INDIRECT("'"&M1&"'!\$H:\$H"),'Spend v budget'!\$D3,INDIRECT("'"&M1&"'!\$I:\$I")),SUMIF('Cash forecast'!\$B:\$B,'Spend v budget'!\$B3,'Cash forecast'!J:J)))

Thanks guys. That's a massive help to me

Replies
2
Views
161
Replies
3
Views
355
Replies
4
Views
300
Replies
1
Views
171
Replies
5
Views
292

1,216,086
Messages
6,128,734
Members
449,466
Latest member
Peter Juhnke

### 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