I've got a couple of workbooks and I just learned how to connect them to each other. Everything works fine, but I still got a question about this. Is is possible to use row values in directories? Here is a screenshot of what I mean.
Asked
Active
Viewed 25 times
0

RuuddR
- 941
- 4
- 13
- 25
-
1Are you talking about the [indirect()](https://support.office.com/en-us/article/INDIRECT-function-474b3a3a-8a26-4f44-b491-92b6306fa261) function? Then this might be of interest to you: http://www.contextures.com/xlFunctions05.html and this http://stackoverflow.com/questions/23818777/wildcard-reference-to-another-workbook-with-indirect-function – Ralph Apr 20 '17 at 13:21
-
I'm not sure if that's what I'm looking for. I just need to be able to replace some parts of the directory with variable row values. For example in java you could do: String name = "name"; String directory = "C:/Program Files/" + name; – RuuddR Apr 20 '17 at 13:27
-
1Once again, have a look at the second link and scroll towards the bottom of that page where it says [Create Reference To Different Workbook](http://www.contextures.com/xlFunctions05.html). It seems very much like this is what you want / need / are looking for. – Ralph Apr 20 '17 at 13:29
-
This is exactly what I meant, Thank you very much. I still got one small question. I want to be able to see the numbers even when the other workbook isn't open. The problem is that the INDIRECT function isn't able to do this, however the INDEX function is able to do this, but I don't know how to use it. – RuuddR Apr 20 '17 at 14:31
-
Best case scenario: move away from functions and do it all with VBA. Here is why: https://fastexcel.wordpress.com/2016/04/25/indirect-excels-most-evil-function/ And here is how you'd do it with VBA: http://stackoverflow.com/questions/29310458/how-to-copy-data-from-closed-workbookskeeping-them-closed-into-master-workbook (for your consideration only). If you still want to use `Indirect()` and `Index()` then just read up on the many articles around the internet on these. There is more than enough out there. Come back if you have any **specific** question / problem (and be very detailed about it) – Ralph Apr 20 '17 at 15:05
-
I looked at how the VBA thing works and I tested the test file. There is only one thing that I want to know, because the test thing gets a whole table. The problem is that I want to get 1 cell from each worksheet from about 3 workbooks. Does this mean that I have to make a loop so it loops through all the sheets? – RuuddR Apr 21 '17 at 16:06
-
Yes, that's exactly how it'd work. Try to piece something together and come back if you're having problems / difficulties. – Ralph Apr 21 '17 at 19:10