简体   繁体   中英

Difference of Two Columns Greater Than Threshold Ignoring Errors In Excel

I have the following formula in excel that i want to take the difference between columns V and S and count the number of rows that exceeds some threshold, say 0. It works if all the columns have numbers but if there are errors i receive #VALUE back. How would i change this formula ignore those rows? I've tried using ISNA and ISERROR but have not been able to get them to work.

=SUMPRODUCT(--(V12:V20-S12:S20>U2))

Use this array formula:

=SUM(IFERROR(--(V12:V20-S12:S20>U2),0))

Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of enter when exiting edit mode.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM