sheet name in formula

methody

Well-known Member
Joined
Jun 17, 2002
Messages
857
I have 4 sheets named A B C D and in each sheet the important cell is B6. On a separate sheet I have a data validation cell with a dropdown box with A B C D. On choosing a particular sheet name I want the cell below to become the corresponding value in B6 of the appropriate shheet.

Any help would be appreciated
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Assuming A1 is your sheet with the data validation list from which you choose A, B, C, or D, have B1 =INDIRECT(A1&"!B6")
 
Upvote 0
follow up

Hello
Sorry about this but on a similar theme I still have the same 4 sheets A B C D. Each sheet has a table in the same place with 2 columns. On a separate sheet I select the sheet using data validation withn a cell (in A1). I also select a value in the cell below (A2) which will be in the first column of the tables in the 4 sheets. If I select A in the cell A1 and 'Tom' in cell A2, I want the value to the right of 'Tom' in the table which appears in sheet A.

I know it is probably a combination of INDIRECT and VLookup but I just can't quite get it.
 
Upvote 0
Assuming that on each sheet A5:B100 contains the table, try...

=VLOOKUP(A2,INDIRECT("'"&$A$1&"'!A5:B100"),2,0)

Hope this helps!
 
Upvote 0
similar thing

Hello again
I hope this thread is still open

On a similar vein, I have a base sheet. In a particular cell (B1) I have a data validaton list from which I can select the name of 4 other sheets. In each of these sheets the key range is C6 through to C26. When I select the sheet name from B1 I want the data validation cell in B4 to be populated by the appropriate cells in the range C6 to C26. I am able to do this but if only the cells C6 to C8 are filled I only want them to appear in the data validation cell.
I presume it is a combination of INDIRECT and DYNAMIC ranges using offset but I can't get it to work.
Anybody any idea
 
Upvote 0
Assuming that C6:C26 contains numerical values, try...

=INDIRECT("'"&$B$1&"'!C6"):INDEX(INDIRECT("'"&$B$1&"'!C6:C26"),MATCH(9.99999999999999E+307,INDIRECT("'"&$B$1&"'!C6:C26")))

If the ranges contain text values, replace...

9.99999999999999E+307

with

REPT("z",255)

Hope this helps!

Edited: Corrected the references to match those of the orignal post...
 
Upvote 0
In this case, since INDIRECT is already being used, I should have used OFFSET instead of INDEX, as Andrew has astutely done... :)
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
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