真的为此苦苦挣扎。我需要使用索引和匹配公式来执行一系列的单元格。我如何去掉范围中间的几个单元格?像AK:CH一样,却省略了CA和CC?我无法在以下位置切换单元标题:(
Cells(PoleRow, 3).Formula = "=IFERROR(INDEX($AK$12:$CH$12,1,MATCH(MIN($AK$" & PoleRow & ":$CH$" & PoleRow & "),$AK$" & PoleRow & ":$CH$" & PoleRow & ", 0)),"""")"
答案 0 :(得分:0)
最好按照@Ron Rosenfeld的评论创建UDF,但是,如果仅尝试省略列CA和CC,则可以尝试
Cells(PoleRow, 3).Formula = "=iferror(IF(MIN(AK" & PoleRow & ":BZ" & PoleRow & ")<CB" & PoleRow & ",IF(MIN(CD" & PoleRow & ":CH" & PoleRow & ")<MIN(AK" & PoleRow & ":BZ" & PoleRow & "),INDEX(CD12:CH12,1,MATCH(MIN(CD" & PoleRow & ":CH" & PoleRow & "),CD" & PoleRow & ":CH" & PoleRow & ",0)),INDEX(AK12:BZ12,1,MATCH(MIN(AK" & PoleRow & ":BZ" & PoleRow & "),AK" & PoleRow & ":BZ" & PoleRow & ",0))),CB" & PoleRow & "),"""")"