简体   繁体   中英

Excel complicated array

I have a very long formula that churns out the correct answer when it is just focussed on calculating one row.

I want to turn this into an array that will sum over multiple rows, however as soon as i turn the formula into an array it then gives an incorrect value... and i don't know why! For some reason it seems to do an extra multiplication when i put it into an array, i believe anyway.

Original working formula on single row: =(IFERROR(.........

+12.5*$C15), ....)

Not working array: {=SUM(IFERROR(.........

+12.5*$C15:$C16), ....)

When C15 is 0.5, the array returns a value that is 6.25 too low When C15 is 1, the array returns a value that is 12.5 too low When C15 is 1, the array returns a value that is 25 too low

So it is most definitely something to do with the 12.5 but i don't understand why turning it into an array makes it return a value too low.

Based on the duplicate question found here: https://stackoverflow.com/questions/42025870/excel-array-formula-complicated?noredirect=1

You do not need the IFERROR:

The CSE array formula:

 =SUM(IF(ISNUMBER(SEARCH("S",B2:B3,1), 1, 2))

Remove the quotes around the numbers, with quotes they are strings and SUM will ignore them.

The ISNUMBER takes the place of the IFERROR.

This is an array formula and needs to be confirmed with Ctrl + Shift + Enter .
If done correctly then Excel will put {} around the formula.

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