close

I want to use the result in a cell to complete the worksheet name part of a
formula, so that the worksheet name can be a variable.
eg. ='sheet2'!A4
but the sheet name needs to be able to change depending on what is in cell
C2 on sheet 1.
Is there already a function that will pull together the text 'Sheet the
value in cell C2 and the text '!A4 and use it as a formula?
or will I need to write a function in VB?

Look at INDIRECT() in XL Help:

For instance:

=INDIRECT(quot;'quot; amp; A1 amp; quot;'!A4quot;)

In article gt;,
Chris gt; wrote:

gt; I want to use the result in a cell to complete the worksheet name part of a
gt; formula, so that the worksheet name can be a variable.
gt; eg. ='sheet2'!A4
gt; but the sheet name needs to be able to change depending on what is in cell
gt; C2 on sheet 1.
gt; Is there already a function that will pull together the text 'Sheet the
gt; value in cell C2 and the text '!A4 and use it as a formula?
gt; or will I need to write a function in VB?

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()