You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

time as SUMIFS condition

Hi,


I was wondering is it possible to have a time format in a condition for SUMIF or COUNTIF formula?


For example I want to sum column A only if B is earlier then 07:30

Can number read time format like this and I could use => ?

My formula is more complicated and I'm using multiple conditions for SUMifs or COUNTifs.


Cheers


Magic

MacBook Pro 13″, macOS 13.3

Posted on Oct 30, 2023 6:04 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 30, 2023 7:18 AM

You can try something like this:



In cell B1 of Table 2.


=SUMIFS(Table 1::A,Table 1::C,"<="&B1)


In cel C2 of Table 1, filled down:


=TIMEVALUE(B2)


TIMEVALUE give the fraction of a day since the previous midnight. Note that in Numbers your cells include both a date and a time even if have formatted the cells to displaying only the time. Using TIMEVALUE avoids the problem of having different "hidden" dates.


Be sure to include the <= between quotation marks.


SUMIFS - Apple Support


TIMEVALUE - Apple Support


SG



3 replies
Question marked as Top-ranking reply

Oct 30, 2023 7:18 AM in response to Rapidmagic

You can try something like this:



In cell B1 of Table 2.


=SUMIFS(Table 1::A,Table 1::C,"<="&B1)


In cel C2 of Table 1, filled down:


=TIMEVALUE(B2)


TIMEVALUE give the fraction of a day since the previous midnight. Note that in Numbers your cells include both a date and a time even if have formatted the cells to displaying only the time. Using TIMEVALUE avoids the problem of having different "hidden" dates.


Be sure to include the <= between quotation marks.


SUMIFS - Apple Support


TIMEVALUE - Apple Support


SG



time as SUMIFS condition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.