matrix26
Board Regular
- Joined
- Dec 16, 2020
- Messages
- 57
- Office Version
- 365
- Platform
- Windows
Hail to thee Gods of Excel,
I have wrestled with this for a few weeks now and I'm getting no where, FAST.
I've even wasted my time trying ChatGPT.
I have a worksheet called "DEVICE INFO"
Column Z of that worksheet has a time range in it, 20:00 - 06:00 etc.
The time range can vary from cell to cell in the column, but it will always be a 10 hour time range and always on the hour.
There will also be hidden rows that I need to ignore
I'm trying to come up with a way to automatically search down column Z, finding all matching time ranges and giving them a batch number
That batch number should be automatically entered in to column B
I.E
The code should find all cell entries that show 00:00 - 10:00 and place a 1 in the appropriate cell in column B
the code should then move on to find all cell entries that show 01:00 - 11:00 and place a 2 in the appropriate cell in column B
The code should iterate until it has gone from 00:00 - 10:00 right through to 23.00 - 09.00
Now, to make matters more complex if the code finds more than 100 entries for any iteration it should start a new "batch" number and continue until no more entries for that particular range are found
All info from column C through Y are irrelevant
I hope what I ask is possible and I thank you all in advance
p.s
here are the ranges so you don't have to write them
00:00 - 10:00
01:00 - 11:00
02:00 - 12:00
03:00 - 13:00
04:00 - 14:00
05:00 - 15:00
06:00 - 16:00
07:00 - 17:00
08:00 - 18:00
09:00 - 19:00
10:00 - 20:00
11:00 - 21:00
12:00 - 22:00
13:00 - 23:00
14:00 - 00:00
15:00 - 01:00
16:00 - 02:00
17:00 - 03:00
18:00 - 04:00
19:00 - 05:00
20:00 - 06:00
21:00 - 07:00
22:00 - 08:00
23:00 - 09:00
I have wrestled with this for a few weeks now and I'm getting no where, FAST.
I've even wasted my time trying ChatGPT.
I have a worksheet called "DEVICE INFO"
Column Z of that worksheet has a time range in it, 20:00 - 06:00 etc.
The time range can vary from cell to cell in the column, but it will always be a 10 hour time range and always on the hour.
There will also be hidden rows that I need to ignore
I'm trying to come up with a way to automatically search down column Z, finding all matching time ranges and giving them a batch number
That batch number should be automatically entered in to column B
I.E
The code should find all cell entries that show 00:00 - 10:00 and place a 1 in the appropriate cell in column B
the code should then move on to find all cell entries that show 01:00 - 11:00 and place a 2 in the appropriate cell in column B
The code should iterate until it has gone from 00:00 - 10:00 right through to 23.00 - 09.00
Now, to make matters more complex if the code finds more than 100 entries for any iteration it should start a new "batch" number and continue until no more entries for that particular range are found
All info from column C through Y are irrelevant
I hope what I ask is possible and I thank you all in advance
p.s
here are the ranges so you don't have to write them
00:00 - 10:00
01:00 - 11:00
02:00 - 12:00
03:00 - 13:00
04:00 - 14:00
05:00 - 15:00
06:00 - 16:00
07:00 - 17:00
08:00 - 18:00
09:00 - 19:00
10:00 - 20:00
11:00 - 21:00
12:00 - 22:00
13:00 - 23:00
14:00 - 00:00
15:00 - 01:00
16:00 - 02:00
17:00 - 03:00
18:00 - 04:00
19:00 - 05:00
20:00 - 06:00
21:00 - 07:00
22:00 - 08:00
23:00 - 09:00