Can INDIRECT do this?

NewburyK

New Member
Joined
Jun 25, 2012
Messages
5
{Windows XP, Excel 2003}

I have been searching for a few hours, but have not come across the information that i need.

My manager has decided that we need a Metrics board of all of our critical numbers posted outside of the door to our department so that the president can see them when he walks by. Currently all those numbers are spread out on various worksheets on different workbooks.

One of those workbooks (currently called Q2.xls) has a new sheet added weekly for that week's schedule, each named the date of the Monday of that week (ex: this weeks is "Jun25"). I have a cell (H1) in my new workbook where I write the Monday date, and i want to reference a cell in the current week's sheet on this other book.

The direct code to the cell is
Code:
=[Q2.xls]Jun25!$BO$31

I'm wondering if i can use INDIRECT to replace "Jun25" with a reference to H1. This code is going to be added to a Macro once I can get it to work, so if there is a VBA code to make this easier, I am open to that too (just note that I am a complete VBA noob, just beginning Macros)

Thank you for your time
-Kevin
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
If you're not using INDIRECT to reference the name of the file and only the Jun25, then I believe it is possible. INDIRECT only has issues with another workbook if you reference the name/file path of the workbook using a cell content. It requires that workbook to be open. But if it's just a section of the sheet itself, then I believe it is.

Do let me know if this is the case with your attempt.
 
Upvote 0
I would save yourself a lot of headaches and create a new sheet in that Q2 book called "ThisWeek" and just have it always reference the latest information in the workbook (use the indirect formula as JMonty suggested in that book). Then just reference the "ThisWeek" sheet from that book in the new sheet to save yourself the trouble.
 
Upvote 0
Thanks for the replies guys, but I actually figured a different way to get this all to work. I just had to get my frame of mind into coding VBA, rather than having a Macro execute an Excel command. I defined a Dim String to point to the cell where I write the week (Jun25 in the example), then use that variable to open the sheet in the other workbook. Worked much easier than trying to get my macro to run the INDIRECT code.
 
Upvote 0

Forum statistics

Threads
1,203,619
Messages
6,056,323
Members
444,859
Latest member
nil164

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