PDA

View Full Version : INDIRECT() function doesn't work: "Can't Find Object or Library"



ramohse
09-27-2013, 12:32 PM
Hi!


So a (hopefully) simple problem: I am trying to use INDIRECT() to create a dynamic table, but whenever I type in the function I get a VBA "Can't Find Object or Library" error, and I could not find a fix for this particular problem. Thank you for your time and assistance!

Kenneth Hobs
09-27-2013, 01:25 PM
Are you using it as a UDF? If not, then post your VBA code.

There is Indirect.Ext() UDF in the addon MoreFunc.

ramohse
09-27-2013, 01:34 PM
I am not. The file itself has a few macros in it, but no UDF's. Just two toggle buttons and a macro that hides columns when a drop-down list changes...

ramohse
09-27-2013, 01:35 PM
which would you like to see?

Kenneth Hobs
09-27-2013, 02:14 PM
Actually, I meant, are you using it as the built-in function which works like a UDF.

IF you are using VBA, you don't need Indirect(). If you were to do so, in the Immediate Window, with B1 having some value of say 5 and A1 have the text value of B1:

?Evaluate(Range("A1").value2)
You would see 5 after pressing the enter key.
or

?Evaluate("Indirect(A1)")

Paul_Hossler
09-28-2013, 06:59 PM
So a (hopefully) simple problem: I am trying to use INDIRECT() to create a dynamic table, but whenever I type in the function I get a VBA "Can't Find Object or Library" error, and I could not find a fix for this particular problem. Thank you for your time and assistance!


Can you explain what are you trying to do, and not how you think you want to do it?

e.g. I need to get the cell address stored as a string in a cell and enter that value times 2 in the cell to the right

e.g. of the e.g. B2 has "D20" in it and I need to take the number in D20, multiply it by 2 and put it into E20


Paul

ramohse
09-30-2013, 06:05 AM
I am trying to create a dynamic table such that one can choose a particular line of business from a drop-down menu and that decision will populate a dashboard by changing the reference tab in the cells below.


Kenneth - I hadn't planned on using VBA for this particular purpose due to simplicity/functionality, but certainly could if I cannot get the basic function to work properly...

katerina75
11-14-2013, 09:06 AM
Hello Paul,
I'm sorry; I probably didn't explain what I want...!:(
I want to input 3 values in a worksheet, i.e "MrX" wants 2 tickets for the "Concert Z". When the input of the last value (which is the number of tickets) is done, I want this value (in this case the number 2) to appear in a separate worksheet. In this separate worksheet I have a table where I keep in a column all the events and in a row all the customer names.
Is it possible to write a macro that will combine the event and the customer's name and will populate the relevant cell with the number of tickets?
I hope I was as clear as possible...!