Sumifs column time = 00:00

woon8888

New Member
Joined
May 18, 2022
Messages
13
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hi experts, please help me review the below

=sumifs(A:A, B:B, time(0,0,0))

column B all has date with time but i only wish to sum those with 00:00
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this:
Excel Formula:
=SUMPRODUCT(--(B:B=INT(B:B)),A:A)
The reason that it works is because date/time is stored as numbers as Excel, specifically the number of days since 1/0/1900.
So time is just a fractional component of one day. So values with no time have no fractional component.
 
Upvote 0
Note if it is possible to have values in column A, and blanks in column B, and you do NOT want to include those rows, then you would just amend my above formula to:
Excel Formula:
=SUMPRODUCT(--(B:B=INT(B:B)),--(B:B>0),A:A)
 
Upvote 0
Hi Joe4,

Thank you for helping but apparent the sumproduct doesn't work. below is a table to show how the excel sheet is and i need to sum up col B base on col A's time being 00:00.

if i
1. sumif COL B, COL A, 00:00 i should get 365
2. sumif COL B, COL A, 11:00 i should get 100
3. sumif COL B, COL A, 15:00 i should get 123


Date & Time (A COL)Quantity (B COL)
11/11:00100
11/12:00150
11/15:00123
12/00:00300
12/01:01400
13/00:0065
 
Upvote 0
Your sample data in post #4 is organized the opposite of what you said in your first post.
column B all has date with time

Also I found that this formula does not work if text headings are present, so I would constrain the references to the used rows rather than the entire column.

$scratch.xlsm
ABCD
111/11:00100365
211/12:00150
311/15:00123
412/00:00300
512/01:01400
613/00:0065
Sheet6
Cell Formulas
RangeFormula
D1D1=SUMPRODUCT(--(A:A=INT(A:A)),--(A:A>0),B:B)
 
Upvote 0
I would also questions those entries are valid time/date entries at all.
It looks like they could be text entries, in which case number/date formulas will not work on them.

That is why it is so important to give us an accurate description of your data!
 
Upvote 1
Very important. I assumed they were date/time formatted as d/hh:mm (which is very eccentric) but if it's text, we start all over again.
 
Upvote 0
T202310a.xlsm
ABCDE
1Date & Time (A COL)Quantity (B COL)
211/11:00100365365
311/12:00150
411/15:00123
512/00:00300
612/01:01400
713/00:0065
2h
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(--(MID(A2:A7,FIND("/",A2)+1,5)="00:00"),B2:B7)
E2E2=SUM((MID(A2:A7,FIND("/",A2)+1,5)="00:00")*B2:B7)
 
Upvote 0
Hi experts, those entries are time and date just formatted to dd/hh:mm format hence 12/00:00hrs
 
Upvote 0
Hi experts, those entries are time and date just formatted to dd/hh:mm format hence 12/00:00hrs
So what still appears to be the issue?

1697067541060.png


My original formula, adjusted for you switch of column A & B, for the data sample above:
Excel Formula:
=SUMPRODUCT(--(A2:A7=INT(A2:A7)),B2:B7)

If something still does not work right, please post a sample of your data, formula, and the output you are getting (and the output you are expecting).
 
Upvote 0
Solution

Forum statistics

Threads
1,215,089
Messages
6,123,058
Members
449,091
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top