在数组公式中处理N / A.

时间:2014-08-18 11:48:06

标签: arrays excel excel-formula excel-addins bloomberg

我想弄清楚如何在使用数组的公式中处理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是今天的日期

1 个答案:

答案 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)