Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Currently, I have a cell referencing a table on another sheet like so:
=VLOOKUP(A5,'Sheet2'!$J$4:$J$1998,1,TRUE) But what I want to do is instead of referencing the sheet explicitly (i.e. Sheet2), I'd like to reference a sheet based on another cell's value. E.g.: =VLOOKUP(A5,'A2'!$J$4:$J$1998,1,TRUE) where A2 would have the value "Sheet2". Is this possible within excel? -- Thanks! Max |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at the indirect formula. It will allow you to change the sheet
references. Just keep in mind that indirect is a volitile function meaning that it will recalculate every time a calculation occures. If you have thousands of these formulas then the performance will drop off significantly (especially since Vlookup is a slow formula). If that is the case then you might want to use a named range and just change the named range reference to keep the performance up. -- HTH... Jim Thomlinson "Max" wrote: Currently, I have a cell referencing a table on another sheet like so: =VLOOKUP(A5,'Sheet2'!$J$4:$J$1998,1,TRUE) But what I want to do is instead of referencing the sheet explicitly (i.e. Sheet2), I'd like to reference a sheet based on another cell's value. E.g.: =VLOOKUP(A5,'A2'!$J$4:$J$1998,1,TRUE) where A2 would have the value "Sheet2". Is this possible within excel? -- Thanks! Max |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=vlookup(a5,indirect("'" & a2 & "'!j4:j1998"),1,true)
Max wrote: Currently, I have a cell referencing a table on another sheet like so: =VLOOKUP(A5,'Sheet2'!$J$4:$J$1998,1,TRUE) But what I want to do is instead of referencing the sheet explicitly (i.e. Sheet2), I'd like to reference a sheet based on another cell's value. E.g.: =VLOOKUP(A5,'A2'!$J$4:$J$1998,1,TRUE) where A2 would have the value "Sheet2". Is this possible within excel? -- Thanks! Max -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=VLOOKUP(A5,Indirect("'" & A2 & "'!$J$4:$J$1998"),1,TRUE)
-- Regards, Tom Ogilvy "Max" wrote in message ... Currently, I have a cell referencing a table on another sheet like so: =VLOOKUP(A5,'Sheet2'!$J$4:$J$1998,1,TRUE) But what I want to do is instead of referencing the sheet explicitly (i.e. Sheet2), I'd like to reference a sheet based on another cell's value. E.g.: =VLOOKUP(A5,'A2'!$J$4:$J$1998,1,TRUE) where A2 would have the value "Sheet2". Is this possible within excel? -- Thanks! Max |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sheet Referencing - autofilling sheet names | Excel Worksheet Functions | |||
Vlookup returning NA when referencing cell data to another sheet | Excel Worksheet Functions | |||
copy formula referencing sheet name to another sheet | Excel Worksheet Functions | |||
referencing a sheet named in a cell then using data from that sheet | Excel Worksheet Functions | |||
Excel VBA - VLookup problem referencing another sheet in the same workbook | Excel Programming |