How to make a reference to a cell of another sheet, when the sheet name is the value of a cell?

后端 未结 2 1804
夕颜
夕颜 2020-12-09 20:49

In excel 2007, I have a formula in a cell like the following:

=COUNTIFS(\'2008-10-31\'!$C:$C;\">=\"&\'$A7)

Now I want to make the na

相关标签:
2条回答
  • 2020-12-09 21:20

    You are looking for the INDIRECT worksheet function:

    =INDIRECT("SHEET2!A1")
    =COUNTIFS(INDIRECT(A1 & "!$C:$C"); ">=" & $A7)
    

    The function turns a string into a real cell reference.

    0 讨论(0)
  • 2020-12-09 21:29

    INDIRECT does what you want. Note that if the sheet name has any spaces, you need to put single quotes round it, ie

    =COUNTIFS(INDIRECT("'" & A1 & "'!$C:$C"); ">=" & $A7)
    
    0 讨论(0)
提交回复
热议问题