简体   繁体   中英

Given an array, how can I index match each value and sum them without a helper column?

I have multiple rows 34 columns wide with a reference Designator(RefDes) in each one that correlates to a value. I am trying to find a way to match each RefDes to its value and sum those together without the use of a helper cell for each column to give each row a total value.

My current formula will work with a helper cell but that adds 34 more columns and makes it very messy and hard to read.

=INDEX(FullFlow2[[Category Times]:[Category Times]],MATCH(N4,FullFlow2[[REFDES]:[REFDES]]))

Followed by a =sumproduct() in another column to collect the values.

Not sure if this is something I will need to use VBA for or if I can make it work without it.

This is the RefDesTable below 参考表

This is the FullFlow2 Table below

全流表

Use SUMIFS wrapped in a SUMPRODUCT:

=SUMPRODUCT(SUMIFS(FullFlow2[[Category Times]:[Category Times]],FullFlow2[[REFDES]:[REFDES]],YourFirstTableName[1st]))

Replace YourFirstTableName with the correct name for the table.

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