0

I placed an example below, of which I don't necessarily 'need' to work, but I don't like that I can't get it to work. :) I've attempted to use the ISNA function, but am having little success since I

=IF(VLOOKUP(H3,Credit!H:J,3,FALSE)=(J3*-1),"Please Purge",IF(VLOOKUP(H3,Credit!H:J,3,FALSE)<(J3*-1),"Not enough Credit... research",IF(VLOOKUP(H3,Credit!H:J,3,FALSE)<(J3*-1),"Additional Credit…  Research","No Credit Exists")))

I really would like to have a response to each formula, am I using the wrong functions or the wrong format?

Thanks!

4

2 回答 2

1

为避免多次重复 VLOOKUP 函数,您可以在这种情况下使用 SIGN 和 CHOOSE,如下所示

=CHOOSE(SIGN(VLOOKUP(H3,Credit!H:J,3,FALSE)+J3)+2,"Not enough Credit... research","Please Purge","Additional Credit… Research")

如果将 VLOOKUP 结果添加到 J3,您将得到一个负数、零或正数,SIGN 函数将分别返回 -1、0 或 1,然后添加 2 得到 1、2 或 3,因此我们可以使用 CHOOSE 函数将 1,2 或 3 转换为相关的文本值

如果在 Credit!H:H 中找不到 H3,该公式仍然会给出 #N/A 错误,因此为了避免使用 IFERROR 函数(假设 Excel 207 或更高版本),因此最终版本变为:

=IFERROR(CHOOSE(SIGN(VLOOKUP(H3,Credit!H:J,3,FALSE)+J3)+2,"Not enough Credit... research","Please Purge","Additional Credit… Research"),"No credit exists")

于 2013-06-14T14:04:05.027 回答
0

也许

=IF(ISNA(MATCH(H3,Credit!H:H,0)),"No Credit Exists",IF(VLOOKUP(H3,Credit!H:J,3,FALSE)=(J3*-1),"Please Purge",IF(VLOOKUP(H3,Credit!H:J,3,FALSE)<(J3*-1),"Not enough Credit... research","Additional Credit… Research")))

MATCH 部分在 Credit!H:H 中查找值 H3,如果不存在,则 ISNA 处理结果错误并返回“不存在信用”;其余的基本上只是对原始公式的调整

于 2013-06-14T13:13:45.603 回答