Array returning #N/A for some elements, want blank

 ̄綄美尐妖づ 提交于 2019-12-25 13:15:24

问题


I am using the excel tools OFFSET and INDEX to import an array from a different sheet, into a workbook with room for 7 entries. The sheet that is being referenced has an ID number and the number could be listed several times for different entries. If you are not familiar with the offset function, the second to last input is how many rows you want returned in the array. The number I have here is a COUNTIF for how many times an ID appears.

My code works, however because it is in an array format, this code was implemented for the 7 entries and not all IDs have 7 entries (it varies for each ID). So for the IDs with less than 7 entries #N/A appears. I thought this would be a simple fix to replace the error with a blank cell, but I've tried using IFERROR, ISNA, and other methods but nothing has worked.

This is my raw array code without any if statements.

=OFFSET(INDEX(Compliance,MATCH(CONCATENATE(ID,"*"),Compliance,0)),0,1,COUNTIF(Compliance,CONCATENATE(ID,"*")),2)

Compliance is a certain column within the sheet that I am indexing on and ID is the different ID numbers that I was referring to.

来源:https://stackoverflow.com/questions/31855683/array-returning-n-a-for-some-elements-want-blank

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!