简体   繁体   中英

Excel SUMIFS formula based on column names

Im trying to sum row range based on the column name values.

For example: Columns are horizontally positioned postal code numbers桌子

and below are values, the sum i want to make is based on postal code numbers that are between 1000 and 1700.

Columns format is general and values are number and the columns are from pivot table which gets data from data model.

I tried with SUMIFS formula, but maybe im mistaken somewhere and result is 0.

=SUMIFS(B3:CW3;B2:CW2;">1000";B2:CW2;"<1700")

File: https://dox.abv.bg/download?id=193e65df0d# - Download link

Thanks in advance and have a nice day!

Since your postalcode is stored as text:

在此处输入图片说明

We can use NUMBERVALUE together with SUMPRODUCT to make it work.

=SUMPRODUCT((B3:H3)*(NUMBERVALUE(B2:H2)>1000)*(NUMBERVALUE(B2:H2)<1700))

Result (notice that postalcode 1360 + 1528 will be summed):

在此处输入图片说明

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