ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula to reference another worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/240951-formula-reference-another-worksheet.html)

SixBowls

Formula to reference another worksheet
 
I have a macro that creates worksheets based on a list (tasks) on Sheet1. On
Sheet2 in column A, the worksheet has the same list of tasks. The formula on
Sheet2 cell A3 is ='Sheet1'$b$15. The result is "Maintenance" which is the
first task on Sheet1 and will be the first new worksheet the macro is run.

I would like cell B3 on Sheet2 to be ='Maintenance'$C$89. Is there anyway
to write a formula that will look at the result of A3 and let me use that for
the worksheet function?

Pete_UK

Formula to reference another worksheet
 
Try this in B3:

=INDIRECT("'"&A3&"'!C89")

Hope this helps.

Pete

On Aug 27, 9:51*pm, SixBowls
wrote:
I have a macro that creates worksheets based on a list (tasks) on Sheet1. *On
Sheet2 in column A, the worksheet has the same list of tasks. *The formula on
Sheet2 cell A3 is ='Sheet1'$b$15. *The result is "Maintenance" which is the
first task on Sheet1 and will be the first new worksheet the macro is run.. *

I would like cell B3 on Sheet2 to be ='Maintenance'$C$89. *Is there anyway
to write a formula that will look at the result of A3 and let me use that for
the worksheet function?



SixBowls

Formula to reference another worksheet
 
Thanks! That works perfectly. Is there a way that it can return a 0 if the
sheet does not exist. Right now it is returning #REF!. I remeber using
ISERROR to fix a similar problem but I have not been able to get that to work.

"Pete_UK" wrote:

Try this in B3:

=INDIRECT("'"&A3&"'!C89")

Hope this helps.

Pete

On Aug 27, 9:51 pm, SixBowls
wrote:
I have a macro that creates worksheets based on a list (tasks) on Sheet1. On
Sheet2 in column A, the worksheet has the same list of tasks. The formula on
Sheet2 cell A3 is ='Sheet1'$b$15. The result is "Maintenance" which is the
first task on Sheet1 and will be the first new worksheet the macro is run..

I would like cell B3 on Sheet2 to be ='Maintenance'$C$89. Is there anyway
to write a formula that will look at the result of A3 and let me use that for
the worksheet function?




SixBowls

Formula to reference another worksheet
 
I got the ISERROR to work. Thanks for the help!

=IF(ISERROR(INDIRECT("'"&A3&"'!C89")),0,INDIRECT(" '"&A3&"'!C89"))

"SixBowls" wrote:

Thanks! That works perfectly. Is there a way that it can return a 0 if the
sheet does not exist. Right now it is returning #REF!. I remeber using
ISERROR to fix a similar problem but I have not been able to get that to work.

"Pete_UK" wrote:

Try this in B3:

=INDIRECT("'"&A3&"'!C89")

Hope this helps.

Pete

On Aug 27, 9:51 pm, SixBowls
wrote:
I have a macro that creates worksheets based on a list (tasks) on Sheet1. On
Sheet2 in column A, the worksheet has the same list of tasks. The formula on
Sheet2 cell A3 is ='Sheet1'$b$15. The result is "Maintenance" which is the
first task on Sheet1 and will be the first new worksheet the macro is run..

I would like cell B3 on Sheet2 to be ='Maintenance'$C$89. Is there anyway
to write a formula that will look at the result of A3 and let me use that for
the worksheet function?




Pete_UK

Formula to reference another worksheet
 
Glad to hear it - thanks for feeding back.

Pete

On Aug 28, 3:26*pm, SixBowls
wrote:
I got the ISERROR to work. *Thanks for the help!

=IF(ISERROR(INDIRECT("'"&A3&"'!C89")),0,INDIRECT(" '"&A3&"'!C89"))



"SixBowls" wrote:
Thanks! *That works perfectly. *Is there a way that it can return a 0 if the
sheet does not exist. *Right now it is returning #REF!. *I remeber using
ISERROR to fix a similar problem but I have not been able to get that to work.


"Pete_UK" wrote:


Try this in B3:


=INDIRECT("'"&A3&"'!C89")


Hope this helps.


Pete


On Aug 27, 9:51 pm, SixBowls
wrote:
I have a macro that creates worksheets based on a list (tasks) on Sheet1. *On
Sheet2 in column A, the worksheet has the same list of tasks. *The formula on
Sheet2 cell A3 is ='Sheet1'$b$15. *The result is "Maintenance" which is the
first task on Sheet1 and will be the first new worksheet the macro is run.. *


I would like cell B3 on Sheet2 to be ='Maintenance'$C$89. *Is there anyway
to write a formula that will look at the result of A3 and let me use that for
the worksheet function?- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com