admin管理员组文章数量:1435289
I have a summary tab with column headers for each week with tabs that match the name exactly, but the column headers in the underlying tabs are not consistent.
The current formula manually calls those tab names:
=IFERROR(INDEX('17/09'!$C:$Y, MATCH($B4, '17/09'!$B:$B, 0), MATCH(G$3, '17/09'!$C$3:$Y$3, 0)),0)
I'm trying to update with the INDIRECT function and this formula works:
=INDEX(INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$S:$S"), MATCH($B4, INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$B:$B"), 0),0)
But when I try to patch in the 2nd MATCH it fails:
=INDEX(INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$C:$Y"), MATCH($B4, INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$B:$B"), 0),
MATCH(F$3, INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$C$3:$W$3", 0)),0)
Error Function INDIRECT parameter 1 value is ''10/09'!$C$3:$W$3'. It is not a valid cell/range reference.
Can you help?
I have a summary tab with column headers for each week with tabs that match the name exactly, but the column headers in the underlying tabs are not consistent.
The current formula manually calls those tab names:
=IFERROR(INDEX('17/09'!$C:$Y, MATCH($B4, '17/09'!$B:$B, 0), MATCH(G$3, '17/09'!$C$3:$Y$3, 0)),0)
I'm trying to update with the INDIRECT function and this formula works:
=INDEX(INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$S:$S"), MATCH($B4, INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$B:$B"), 0),0)
But when I try to patch in the 2nd MATCH it fails:
=INDEX(INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$C:$Y"), MATCH($B4, INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$B:$B"), 0),
MATCH(F$3, INDIRECT(CHAR(39)&TEXT(F$2,"DD/MM")&"'!$C$3:$W$3", 0)),0)
Error Function INDIRECT parameter 1 value is ''10/09'!$C$3:$W$3'. It is not a valid cell/range reference.
Can you help?
Share Improve this question asked Nov 17, 2024 at 1:00 Justin CohenJustin Cohen 71 silver badge2 bronze badges1 Answer
Reset to default 1I removed the Excel
tag since it's clearly not an Excel question (Excel does not allow the slash character in sheet names).
The issue you're encountering is because the INDIRECT
function does not accept cell or range references that are formatted with the CHAR(39)
single quotes..
Your formula fails because INDIRECT
is not parsing CHAR(39)
correctly when combined with TEXT
and MATCH
in the range string.
Instead of using CHAR(39)
, concatenate the strings directly using single quotes like this:
=INDEX(INDIRECT("'" & TEXT(F$2,"DD/MM") & "'!$C:$Y"),
MATCH($B4, INDIRECT("'" & TEXT(F$2,"DD/MM") & "'!$B:$B"), 0),
MATCH(F$3, INDIRECT("'" & TEXT(F$2,"DD/MM") & "'!$C$3:$W$3"), 0))
本文标签: google sheetsINDIRECT function in an INDEXMATCHMATCHStack Overflow
版权声明:本文标题:google sheets - INDIRECT function in an INDEX-MATCH-MATCH - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745640581a2667831.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论