vlookup same value across multiple sheets

shakethingsup

Board Regular
Joined
May 21, 2017
Messages
64
Office Version
  1. 365
Platform
  1. Windows
Hi,

I used the forum search but can`t exactly find what I`m looking for. I didn`t click on every post but I read through relevant titles. Maybe someone can point me to a thread that has this question.

I have a summary sheet which I need to populate based on multiple sheets in my workbook.

Property 1Property 2Property 3Property 4
Hydro
Water
Gas

<tbody>
</tbody>

In each sheet named property 1, property 2, property 3, etc., there will be a hydro line with a value. I need to populate the rows across with values from each sheet.

solution 1:
Use a vlookup and simply search each sheet individually.

solution 2:
is there another way to do this?

Thank you
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I'm assuming the value we're comparing against is in column A on each sheet, and the returned value is in column B.

Try:
=VLOOKUP(A1,INDIRECT(B$1&"!A:B"),2,0)
 
Upvote 0
Hey MrKowz - why use the indirect function?

I tried it with the indirect function, I got #REF!

I tried it without but still referencing B$1&"!A:B" - I got #value

My actual value is in column 11 in tab 1 - Queens variances.

Rd07yp9.png
 
Upvote 0
The INDIRECT function allows us to use cell values to affect the reference we want to look at. In this case, we want to adjust the worksheet reference by using the values in row 1. Because your worksheets have spaces in their names, the formula I provided initially didn't work. Try the below function, it wraps the worksheet name (B$1) in single quotes, which will allow the function to operate as intended.

=VLOOKUP(A3,INDIRECT("'"&B$1&"'!A4:S100"),11,FALSE)
 
Last edited:
Upvote 0
Solution
Never mind, figured it out. It was a matter of putting quotes in the right places!

THank you!
 
Upvote 0
solution 2:
is there another way to do this?

If there will only be one line on each of the Property sheets you're generating your summary from, not really. Your description of your current data suggest very simple and limited number of lines.
However, once things (if?) get more complicated where you could have multiple lines to sum together you would want a more flexible solution.
Currently with Excel 2016, there is the ability to combine the multiple tables to generate a "new" data source (via Data Model) and then plug that data into a Pivot Table.
 
Upvote 0
Let me look into "data model" - I'm not sure what this is but I saw an icon.

You're right could get more complicated. I didn't go into the full process as to how I combine aggregate the data. Let me check out and learn the function you suggested and see how I could apply it.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top