首页 > 解决方案 > Summing-if minutes shown as strings

问题描述

I have a range of times in minutes displayed as strings "30", "33" etc, which I will need to sum to display as the total number of minutes. Plus a value will need to be summed only if a condition is true - hence I will need to use SUMIF if I were in an Excel worksheet proper.

Is there a quick build-in function for summing stringed minutes (ideally a sumif variant) without using extensive VBA manipulations?

Note: I cannot append another column and convert those values to Time - it will have to be done in a single 'summing' cell.

Many thanks!

标签: excelexcel-formulavba

解决方案


如果您的分钟只是存储为文本,您可以使用SUMPRODUCT()

在此处输入图像描述

=SUMPRODUCT((Ciriteria_range="Criteria")*Minutes_range*1)


推荐阅读