Dealing with Date and time in SUMIFS

I have two tables, Table 1 have all my data of my sales in different columns


In table 2, I'd like to sum all my sales based on what payment method I sold those. It seems SUMIFS only consider date and not time. Is there any way to solve this?


MacBook Air 13″, macOS 14.5

Posted on Jun 29, 2024 7:44 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 29, 2024 8:22 PM

Just the opposite. It is considering the time. But that's not your only issue. Your SUMIFS says to add up all unit prices where the SKU (Table 1::B) = 6/26/24 at 12:00AM and the payment method is cash. So it is attempting to sum up the unit prices, not the actual sales/totals, and is comparing the SKU to a date.


To add up the totals for the date, regardless of the time, you need to check that the date&time is greater than or equal to the specified date at 12AM and also less than the next day at 12AM.


Formula in C2 =SUMIFS(Table 1::G,Table 1::A,">="&A2,Table 1::A,"<"&A2+1,Table 1::I,"Cash")

I did not recreate your table and test this formula. I hope I got it right.


Make sure you don't put a time other than 12AM in cell A2 or the rest of the column. If you simply type the date and no time, it will be 12AM. Format the column to not show the time.

1 reply
Question marked as Top-ranking reply

Jun 29, 2024 8:22 PM in response to Cranmer_CS

Just the opposite. It is considering the time. But that's not your only issue. Your SUMIFS says to add up all unit prices where the SKU (Table 1::B) = 6/26/24 at 12:00AM and the payment method is cash. So it is attempting to sum up the unit prices, not the actual sales/totals, and is comparing the SKU to a date.


To add up the totals for the date, regardless of the time, you need to check that the date&time is greater than or equal to the specified date at 12AM and also less than the next day at 12AM.


Formula in C2 =SUMIFS(Table 1::G,Table 1::A,">="&A2,Table 1::A,"<"&A2+1,Table 1::I,"Cash")

I did not recreate your table and test this formula. I hope I got it right.


Make sure you don't put a time other than 12AM in cell A2 or the rest of the column. If you simply type the date and no time, it will be 12AM. Format the column to not show the time.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Dealing with Date and time in SUMIFS

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