formula to lookup count or rank of 100 in list of dates

bh24524

Active Member
Joined
Dec 11, 2008
Messages
365
Office Version
  1. 365
  2. 2007
Hi, I have a big list of dates in column A and they aren't necessarily falling consecutively, i.e 7/1, 7/2, 7/3. They might actually skip dates like 7/1, 7/5, 7/13. We'll say they start in A1(They don't actually , but for simplicity sake)As you go down the column, you will never find a date that happens prior to the one in the row before. They all fall after one another.

I'm wondering is there is a function or combo I can use to find the 100th date in the list? Let's just say that function will go in B1.
 
10/17 is not the 50th date in the list:
That's what the original was doing, the new formula is giving you the 50th date after the dates have been sorted.
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
That's what the original was doing, the new formula is giving you the 50th date after the dates have been sorted.
But I'm saying, that even though I put 50 in the formula, 10/17/23 is the 30th date in the list, not the 50th. As another example, if I change the 50 to 30 in the formula, I'm getting 9/19/23 as my 30th date and it's the tenth one:
1722614732280.png

I sorted that list above in order myself just out of curiosity but there wasn't any difference, it was giving the same date.

Could it have something to do with the way the dates are formatted maybe? like how the single digit months have zeros in front of them?
 
Last edited:
Upvote 0
Can you post some sample data that shows the problem.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data that shows the problem.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Sure, here you go.

Punch Summary (29).xls
ABCDEFGHIJK
109/19/2023
2
3
5
6
7
9
11
12DatePunch In 1Punch Out 1Punch In 2Punch Out 2Punch In 3Punch Out 3Punch In 4Punch Out 4Amount
1309/12/202306:54 AM03:00 PM8.10
1409/13/202308:56 AM05:00 PM8.07
1509/14/202308:55 AM05:01 PM8.10
1609/15/202308:55 AM04:30 PM7.58
1709/18/202309:55 AM06:00 PM8.08
1809/19/202309:56 AM04:08 PM6.20
1909/20/202309:55 AM06:01 PM8.10
2009/21/202309:58 AM05:39 PM7.68
2109/22/202309:53 AM05:22 PM7.48
2209/24/202309:54 AM05:05 PM7.18
2309/26/202310:00 AM04:56 PM6.93
2409/28/202309:54 AM04:51 PM6.95
2509/29/202309:57 AM05:00 PM7.05
2609/30/202306:54 AM12:35 PM5.68
2710/01/202309:55 AM05:17 PM7.37
2810/03/202309:55 AM04:13 PM6.30
2910/05/202309:58 AM06:08 PM8.17
3010/06/202309:55 AM05:08 PM7.22
3110/07/202306:55 AM01:28 PM6.55
3210/08/202309:54 AM06:06 PM8.20
3310/10/202309:54 AM04:22 PM6.47
3410/12/202309:01 AM04:54 PM7.88
3510/13/202309:57 AM06:31 PM8.57
3610/15/202306:57 AM06:46 PM11.82
3710/16/202309:58 AM06:25 PM8.45
3810/17/202309:53 AM05:14 PM7.35
3910/19/202309:00 AM04:41 PM7.68
4010/20/202307:00 AM12:38 PM5.63
4110/22/202306:54 AM01:44 PM6.83
4210/23/202308:53 AM05:36 PM8.72
4310/24/202309:57 AM04:57 PM7.00
4410/26/202308:53 AM04:53 PM8.00
4510/27/202307:00 AM06:05 PM11.08
4610/29/202307:01 AM01:22 PM6.35
4710/30/202307:03 AM05:47 PM10.73
4810/31/202308:59 AM04:39 PM7.67
4911/01/202306:58 AM04:50 PM9.87
5011/02/202308:53 AM06:36 PM9.72
5111/05/202307:01 AM07:25 PM12.40
5211/06/202307:01 AM06:11 PM11.17
5311/07/202308:59 AM01:24 PM4.42
5411/08/202307:01 AM06:11 PM11.17
5511/09/202308:59 AM06:47 PM9.80
5611/12/202306:55 AM07:18 PM12.38
5711/13/202306:57 AM06:42 PM11.75
5811/16/202309:00 AM07:48 PM10.80
5911/17/202308:53 AM02:25 PM5.53
6011/19/202306:59 AM02:46 PM7.78
6111/20/202307:00 AM06:06 PM11.10
6211/21/202306:59 AM01:47 PM6.80
6311/22/202307:02 AM11:25 AM4.38
6411/24/202307:01 AM05:40 PM10.65
6511/26/202306:59 AM02:30 PM7.52
6611/27/202306:59 AM05:56 PM10.95
6711/28/202306:59 AM10:52 AM3.88
6811/29/202306:57 AM10:59 AM4.03
6911/30/202307:01 AM04:45 PM9.73
7012/03/202308:55 AM04:44 PM7.82
7112/04/202308:55 AM06:49 PM9.90
7212/06/202308:54 AM05:00 PM8.10
7312/07/202308:56 AM05:01 PM8.08
7412/08/202308:57 AM05:00 PM8.05
7512/13/202308:54 AM05:00 PM8.10
7612/14/202308:55 AM05:00 PM8.08
7712/15/202308:55 AM05:00 PM8.08
7812/17/202308:59 AM06:45 PM9.77
7912/18/202309:02 AM05:01 PM7.98
8012/20/202308:57 AM05:00 PM8.05
8112/21/202308:59 AM05:00 PM8.02
8212/22/202309:00 AM06:14 PM9.23
8312/24/202306:57 AM01:40 PM6.72
8412/27/202308:56 AM06:22 PM9.43
8512/28/202309:00 AM05:00 PM8.00
8612/29/202308:59 AM05:00 PM8.02
8712/31/202306:58 AM03:00 PM8.03
8801/03/202408:54 AM05:45 PM8.85
8901/04/202408:55 AM05:00 PM8.08
9001/05/202408:58 AM05:53 PM8.92
9101/06/202406:58 AM11:52 AM4.90
9201/07/202408:57 AM05:00 PM8.05
9301/08/202408:56 AM06:00 PM9.07
9401/10/202409:01 AM04:32 PM7.52
9501/11/202408:59 AM04:46 PM7.78
9601/12/202409:01 AM04:45 PM7.73
9701/14/202408:58 AM06:00 PM9.03
9801/15/202408:59 AM05:00 PM8.02
9901/17/202408:56 AM04:15 PM7.32
10001/18/202409:14 AM05:00 PM7.77
10101/19/202409:01 AM07:00 PM9.98
10201/21/202408:56 AM05:51 PM8.92
10301/22/202409:00 AM05:00 PM8.00
10401/24/202408:58 AM04:15 PM7.28
10501/25/202408:57 AM05:00 PM8.05
10601/26/202409:00 AM05:01 PM8.02
10701/27/202406:54 AM11:01 AM4.12
10809/06/202308:00 AM03:50 PM7.83
10909/07/202307:52 AM02:50 PM6.97
11009/08/202309:56 AM06:00 PM8.07
11109/11/202309:02 AM05:00 PM7.97
Sheet1
Cell Formulas
RangeFormula
D1D1=INDEX(SORT(A13:A200),30)


Note that data doesn't actually go to row 200, I just put that as a comfortable range because the last row of data is variable for everyone. Thanks for the test Here link. I hadn't known about that.
 
Last edited:
Upvote 0
Thanks for that (y)
You have 4 rows of dates at the end which are earlier than 19th Oct hence you get the 19th not 23rd
 
Upvote 0
Thanks for that (y)
You have 4 rows of dates at the end which are earlier than 19th Oct hence you get the 19th not 23rd
The formula should yield October 19th? It's actually September 19th that it is giving though, that's what's puzzling me.
 
Upvote 0
In that case your dates are probably text & not real dates. What does
Excel Formula:
=isnumber(a14)
return?
 
Upvote 0
In that case your dates are probably text & not real dates. What does
Excel Formula:
=isnumber(a14)
return?
It is coming up with False. It is sounding like it might be quicker to just manually sort the data and then type the original index formula, no?
 
Upvote 0
In that case they are text & not dates. It would be best to convert them to proper dates, which you can do using text to columns on the data tab.
 
Upvote 0
I'll use your original formula as the solution for this as it does work when the data is sorted. I'm just trying to come up with the quickest and easiest method to doing this and there will be multiple people doing it at times, so I kinda just want to get a best practice established that's easy for them to remember. From what I've observed, most people here don't seem to be familiar with the Text To Columns option - I use it all the time but am in the minority - So I think just having them sort it and then either highlight the cells until it reaches the needed count or using the original formula might be easiest. Thanks for your help. Sorry we ended up having to spend all this time on this only to figure out it was that :rolleyes:
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,154
Members
452,615
Latest member
bogeys2birdies

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