Why The Fucck Can I Not Get Excel To Count or Tally How Many Times A Number Occurs in a Row of Cells?

Ghost Utmost

The Soul of the Internet
Supporter
Joined
May 2, 2012
Messages
19,750
Reputation
8,313
Daps
71,309
Reppin
the Aether
Breh

Been almost a decade since I had a job that requires me to use Excel

But I used to process junk mail lists and the amount of manipulation I had to do with the raw data provided from whatever source was crazy.

I know for sure that Excel can do what you're asking. I done forgot all my tricks.

Props to the Brehs for providing info on this

And. Yeah, I bet an AI can write the formula in one second.

Try Google Gemini if you don't have access to other AI
 

bnew

Veteran
Joined
Nov 1, 2015
Messages
55,634
Reputation
8,224
Daps
157,118
To count how many times each hour occurs in a row of cells in Excel:

Using COUNTIF Function​

  1. Extract Hours if Necessary:
    If your hours are part of date/time values, use =HOUR(A1) to extract just the hour component.
  2. Apply COUNTIF:
    • Suppose your hours are listed in cells A1:A10.
    • To count how many times each unique hour occurs, use:
      text
      =COUNTIF(A$1:A$10, A2)
      Here, replace A2 with each unique hour value you want to count.

Using Pivot Table​

  1. Select Data Range:
    Select your data range (e.g., A1:A10).
  2. Insert Pivot Table:
    Go to Insert > PivotTable.
  3. Configure Pivot Table:
    • Drag the hour column into both the "Row Labels" and "Values" areas.
    • This will give you a summary of how many times each hour appears.

Verify Results​

  • Double-check that your counts match what you expect by manually verifying some samples.
  • Ensure there are no errors in your formulas or pivot table setup.
By following these steps, you should be able to accurately count how many times each hour occurs in your dataset.
 

Silkk

Thats My Quarterback :to:
Joined
May 2, 2012
Messages
190,634
Reputation
19,220
Daps
481,900
Yeah......This shyt is 10,684 lines.


ChatGPT lying ass says that it can process it but chokes every time I input the data :beli:


Stupid ass word is doing a halfway decent job but it can't do a whole word/exact match on timestamps like it can actual words :martin:
 

Fat Fred Jones

Reticent
Joined
Jun 15, 2018
Messages
450
Reputation
410
Daps
3,605
Yeah......This shyt is 10,684 lines.


ChatGPT lying ass says that it can process it but chokes every time I input the data :beli:


Stupid ass word is doing a halfway decent job but it can't do a whole word/exact match on timestamps like it can actual words :martin:

If you post some example data, I could probably help you in 2 minutes or less. I need to see what value is in the formula bar to be sure, though. The format is very important.
 

Silkk

Thats My Quarterback :to:
Joined
May 2, 2012
Messages
190,634
Reputation
19,220
Daps
481,900
If you post some example data, I could probably help you in 2 minutes or less. I need to see what value is in the formula bar to be sure, though. The format is very important.
Aight give me sec. Ill be back in a few
 

Fat Fred Jones

Reticent
Joined
Jun 15, 2018
Messages
450
Reputation
410
Daps
3,605
Try this just in case I'm sleep:

I'm assuming your times are in column A starting in row 2. I'm also assuming columns L & M are free of data and are available to use. In my example, I'm assuming you're looking for the 15:00 hour (15:00 -15:59).

In cell L2, use this formula
=text($A5, "hh")

Copy that formula down for all rows of data

In cell M2, use this formula
=countif(L:L, "15")

this will return the number of instances a that entries for 3PM/15:00 occur in column A. times like 3:01PM, 3:44PM, 15:16, 15:58, etc. should all be included in this result. Adjust for your specific spreadsheet.
 

Silkk

Thats My Quarterback :to:
Joined
May 2, 2012
Messages
190,634
Reputation
19,220
Daps
481,900
Try this just in case I'm sleep:

I'm assuming your times are in column A starting in row 2. I'm also assuming columns L & M are free of data and are available to use. In my example, I'm assuming you're looking for the 15:00 hour (15:00 -15:59).

In cell L2, use this formula
=text($A5, "hh")

Copy that formula down for all rows of data

In cell M2, use this formula
=countif(L:L, "15")

this will return the number of instances a that entries for 3PM/15:00 occur in column A. times like 3:01PM, 3:44PM, 15:16, 15:58, etc. should all be included in this result. Adjust for your specific spreadsheet.
Start Time
9:00​
17:00​
18:00​
14:00​
17:00​
18:00​
12:00​
13:00​
7:00​
17:00​
17:00​
15:00​
14:00​
19:00​
8:00​
11:00​
12:00​
13:00​
16:00​
18:00​
20:00​
20:00​
7:00​
8:00​
8:00​
10:00​
13:00​
15:00​
17:00​
17:00​
21:00​
5:00​
8:00​




Column is C
 

Silkk

Thats My Quarterback :to:
Joined
May 2, 2012
Messages
190,634
Reputation
19,220
Daps
481,900
Start DateEnd DateStart Time
16-Sep-24​
16-Sep-24​
9:00​
10-Sep-24​
10-Sep-24​
17:00​
16-Sep-24​
16-Sep-24​
18:00​
20-Sep-24​
20-Sep-24​
14:00​
13-Sep-24​
13-Sep-24​
17:00​
17-Sep-24​
17-Sep-24​
18:00​
20-Sep-24​
20-Sep-24​
12:00​
21-Sep-24​
21-Sep-24​
13:00​
13-Sep-24​
13-Sep-24​
7:00​
21-Sep-24​
21-Sep-24​
17:00​
15-Sep-24​
15-Sep-24​
17:00​
13-Sep-24​
13-Sep-24​
15:00​
15-Sep-24​
15-Sep-24​
14:00​
19-Sep-24​
19-Sep-24​
19:00​
22-Sep-24​
22-Sep-24​
8:00​
12-Sep-24​
12-Sep-24​
11:00​
17-Sep-24​
17-Sep-24​
12:00​
11-Sep-24​
11-Sep-24​
13:00​
11-Sep-24​
11-Sep-24​
16:00​
14-Sep-24​
14-Sep-24​
18:00​
21-Sep-24​
21-Sep-24​
20:00​
12-Sep-24​
12-Sep-24​
20:00​
17-Sep-24​
17-Sep-24​
7:00​
9-Sep-24​
9-Sep-24​
8:00​
12-Sep-24​
12-Sep-24​
8:00​
12-Sep-24​
12-Sep-24​
10:00​
15-Sep-24​
15-Sep-24​
13:00​
17-Sep-24​
17-Sep-24​
15:00​
13-Sep-24​
13-Sep-24​
17:00​
21-Sep-24​
21-Sep-24​
17:00​
10-Sep-24​
10-Sep-24​
21:00​
15-Sep-24​
15-Sep-24​
5:00​
11-Sep-24​
11-Sep-24​
8:00​
17-Sep-24​
17-Sep-24​
11:00​
22-Sep-24​
22-Sep-24​
14:00​
22-Sep-24​
22-Sep-24​
6:00​
17-Sep-24​
17-Sep-24​
10:00​
20-Sep-24​
20-Sep-24​
13:00​
 

Fat Fred Jones

Reticent
Joined
Jun 15, 2018
Messages
450
Reputation
410
Daps
3,605
The solution I provided should work, just revise it as follows:

In cell L2, use this formula
=TEXT($C5, "HH")

Copy that formula down for all rows of data

In cell M2, use this formula
=COUNTIF(L:L, "15")

Change 15 to the hour you need. Also if you only want to find a specific time instead of a whole hour range, revise the column L formula to "HH:MM", then the cell M2 formula to that specific time.
 
Top