Vlookup Question

c0087

Board Regular
Joined
Jul 13, 2015
Messages
94
Office Version
  1. 365
Platform
  1. Windows
[TABLE="width: 350"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2010
[/TD]
[TD]=vlookup($B1,'Sheet1'.$A$1:$D$4,2,0)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2011[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2012[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2013[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


This is the ideal formula I'm using and it returns what I need. Is there a way to drag this down where the Sheet reference increases as well? ('Sheet1' will automatcially increase to 'Sheet 2' in 2011, to 'Sheet3' in 2012, etc.?

Thanks in advance
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You may use a macro
You want to drag down, column A from row1 until the last row ??
It a always start with Sheet1 ?
 
Last edited:
Upvote 0
You can put a list of Sheetnames in a column, example starting at H1

Then in your VLOOKUP sheet reference part use INDIRECT(H1)
 
Upvote 0
You can put a list of Sheetnames in a column, example starting at H1

Then in your VLOOKUP sheet reference part use INDIRECT(H1)


Do i need to put the sheet names in parenthesis?

I tried this: =vlookup($B1,INDIRECT(H1).$A$1:$D$4,2,0)) but not working


H1 = Sheet1
H2 = Sheet2

etc


 
Upvote 0
=vlookup($B1,indirect("Sheet" & row(a1) &"!$A$1:$D$4"),2,0)


(if the sheet names are literally sheet1, sheet2, sheet3......)
 
Last edited:
Upvote 0
No their names alternate. Some are years 2003 - 2017, and some are 1.9, 1.10, 1.11 etc.

I edited mine to look like yours assuming "Sheet" would be "2003", but #REF error

=vlookup($B1,INDIRECT("2003"&"!$A$1:$D$4)2,0)

also tried this just in case, but figured the row part was not needed.

=vlookup($B1,INDIRECT("2003" & ROW(A1) &"!$A$1:$D$4)2,0)
 
Last edited:
Upvote 0
Type whatever the sheet name is in A1:


Excel 2010
ABC
1First Page 175
Sheet5
Cell Formulas
RangeFormula
B1=VLOOKUP($C1,INDIRECT("'"&A1&"'!$A$1:$D$4"),2,0)
 
Last edited:
Upvote 0
Type whatever the sheet name is in A1:

Excel 2010
ABC
First Page 1

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]7[/TD]
[TD="align: right"]5[/TD]

</tbody>
Sheet5

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]=VLOOKUP($C1,INDIRECT("'"&A1&"'!$A$1:$D$4"),2,0)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

You're THE MAN. Thank you
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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