我想弄清楚如何在使用数组的公式中处理N/A
。我使用Bloomberg数据历史加载项BDH
获取最新的EX-DIV
日期。但是,如果数组中有N/A
,则输出为N/A
,而不是最新的EX-DIV
日期。
这是我正在使用的公式:
=IF(AN6="","",INDEX(BDS(AM6,"DVD_HIST_ALL","StartCol=2","EndCol=2","array=true"),MATCH(MIN(ABS(BDS(AM6,"DVD_HIST_ALL","StartCol=2","EndCol=2","array=true")-$A$2)),ABS(BDS(AM6,"DVD_HIST_ALL","StartCol=2","EndCol=2","array=true")-$A$2),0)))
AM6
是sedol AN6
是对数据的检查A2
是今天的日期答案 0 :(得分:1)
您是否尝试使用IFERROR()
封装整个内容?它会变成类似
=IFERROR(IF(AN6="","",INDEX(BDS(AM6,"DVD_HIST_ALL","StartCol=2","EndCol=2","array=true"),MATCH(MIN(ABS(BDS(AM6,"DVD_HIST_ALL","StartCol=2","EndCol=2","array=true")-$A$2)),ABS(BDS(AM6,"DVD_HIST_ALL","StartCol=2","EndCol=2","array=true")-$A$2),0))),$A$2)