Count unique by date/time stamp

Anne Troy

MrExcel MVP
Joined
Feb 18, 2002
Messages
2,632
Office Version
  1. 365
Platform
  1. Windows
Sample file: http://annetroy.com/mrexcel/Sample2.xlsx

Countif and Sumif have always been my nemesis.

I need to count how many unique airlines are listed in column G, each time the timestamp changes in column A.

I only need it to show once in the column.

Sorting first is fine, if necessary. A helper column is fine, too, on a hidden worksheet.

I thank you soooooo much!!!!

Oh... and I also need to check if the timestamp is between 8 pm and 8 am (the next day). A Y or N would be fine. I didn't finish my comments in the file.
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Yes, Aladin, thanks!

I'd like to have the airline count in the first row of each new timestamp.
 
Last edited:
Upvote 0
Yes, Aladin, thanks!

I'd like to have the airline count in the first row of each new timestamp.

In M2 control+shift+enter, not just enter, and copy down:

=IF(ISNA(MATCH($A2,$A$1:A1,0)),SUM(IF(FREQUENCY(IF(1-($G$2:$G$51=""),IF($A$2:$A$51=$A2,MATCH($G$2:$G$51,$G$2:$G$51,0))),ROW($G$2:$G$51)-ROW($G$2)+1),1)),"")
 
Upvote 0
That works GREAT. Now, I just need to subtract one from it, but keep getting a #VALUE error.
Still trying...
 
Upvote 0
That works GREAT. Now, I just need to subtract one from it, but keep getting a #VALUE error.
Still trying...

Try: Contro+shift+enter and copy down

=IF(ISNA(MATCH($A2,$A$1:A1,0)),SUM(IF(FREQUENCY(IF(1-($G$2:$G$51=""),IF($A$2:$A$51=$A2,MATCH($G$2:$G$51,$G$2:$G$51,0))),ROW($G$2:$G$51)-ROW($G$2)+1),1))-1,"")
 
Upvote 0
Oh, I did do the CSE. Checking out the -1 you gave. :D
 
Upvote 0
Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes Yes yes yes.

THANKS!!!!
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,984
Members
449,058
Latest member
oculus

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