Count if Hour in multiple columns

Gusch

New Member
Joined
Sep 15, 2009
Messages
45
I have multiple columns (not next to each other) with times in them (13:45,14:00). I would like to be able count the number of times any given hour shows up. I can do with sumproduct for one column, but not multiple columns.

Thx - Ryan
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
What formula are you using for the one column?

You might be able to just expand the range since
=SUMPRODUCT(--(A1:C10)="z") will return how many cells in A1:C10 contain "z".

For non-continous ranges, if the intervenening columns don't contain dates, their inclusion won't effect anything.
 
Upvote 0
I have multiple columns with times and only need certian ones. I've tried adjusting the range by holding "ctl", but I'm getting 0 back in return
 
Upvote 0
Try
=SUMPRODUCT(SIGN( (HOUR($G$4:$G$21)=9) + (HOUR($L$4:$L$21)=9) = (HOUR($Q$4:$Q$21)=9) + (HOUR($AA$4:$AA$21)=9) ))
to count rows.
Or
=SUMPRODUCT( (HOUR($G$4:$G$21)=9) + (HOUR($L$4:$L$21)=9) = (HOUR($Q$4:$Q$21)=9) + (HOUR($AA$4:$AA$21)=9) )
to count cells.
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,242
Members
452,898
Latest member
Capolavoro009

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