简体   繁体   中英

Excel formula to sum conditionally

在此处输入图片说明

Hi guys,

A simple one I guess. I want a formula that sum the amount of time shown at I11, L11, O11, etc. except if we see "Break Offshore" at the cell below. My function is already shown at the function display but for some reason is not working. Regards, Carlos

You need to specify a range in SUMIF , so if "Break offshore" can't occur in other columns try using this formula

=SUMIF(I11:X11,"<>Break Offshore",I10:X10)

If that doesn't work you can use SUMIFS and include an extra criteria to sum only for relevant columns, ie

=SUMIFS(I10:X10,I11:X11,"<>Break Offshore",I$9:X$9,"T*")

Note that SUMIFS has a different order to SUMIF with the "sum range" first

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