Lookup formula referring to other worksheets with indirect

havardrye

New Member
Joined
Jul 27, 2011
Messages
2
I have workbook with three sheets: Total, UK and FR. I want to build a forumula in "Total" where i use a lookup function that picks a value in the UK or the FR sheet, depending on what I type in cell A1 in "Total".

I have tried to use the "indirect" function, but haven't succeed so far. It seemes that the indirect formula doesen't accept that the string in the referred cell is a formula. Suggestions?

Thanks

Håvard
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Håvard

You could try:

=INDIRECT(A1&"!B1"), this will return the value of B1 in either UK or Fr, depending on what has been entered in A1 on Total.

It sounds like you may have already tried this. And of course B1 is static here. You can work around this by entering this on cell B2 in Total:

=INDIRECT(A1&"!"&ADDRESS(ROW(),COLUMN()))

This will pick up B2 in either UK or Fr. And it is like a relative reference which you can copy to other cells.

Regards

Bill
 
Upvote 0
The problem is that I want to use a lookup function, that looks up in on of the two sheets, depending on wether I write UK og FR in A1.

Håvard
 
Upvote 0
Hi Håvard <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
You can use Indirect with a lookup.<o:p></o:p>
<o:p></o:p>
Something like this works:<o:p></o:p>
<o:p></o:p>
=VLOOKUP("LookupValue",INDIRECT(A1&"!"&"A1:B10"),2,0)<o:p></o:p>
<o:p></o:p>
This looks up the value in column A & retrieves the value in column B. The sheet is determined by your input in A1 on the Total sheet.<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Alternatively, you could use named ranges in your Fr & UK sheets – this will be more flexible and dymanic.<o:p></o:p>
<o:p> </o:p>
Does this help?<o:p></o:p>
<o:p> </o:p>
Bill
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

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