Sheet referencing in a cell

V

velvetlady

I had an earlier post and thought I had an answer. I am trying to reference a
sheet in a workbook in a cell from a different sheet using the sheet
position for the reference. i.e. =sheet(1)A20
i received a reply that =INDIRECT(SHEETNAME(1) & "A3") would do this for me.
Unless is used it incorrectly, I get a #value when using the Indirect
function as shown. I am using Office 2003, not 2007 if that makes a
difference.
Thanks in advance.
 
G

Gary''s Student

You need to install the UDF before you can use it in the worksheet:


UDFs are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To use the UDF from the normal Excel window, just enter it like a normal
Excel Function

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To learn more about UDFs, see:

http://www.cpearson.com/excel/WritingFunctionsInVBA.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top