Need help to find counts of cells with the same date and by different timing..

Status
Not open for further replies.

mars91

New Member
Joined
Jul 8, 2011
Messages
48
I have a list of excel worksheet on Time shift for "Nght" amd "Day". This list will be update everyday.

What i am trying to do :

On column B1 have a header name call shift. Starting from B2 onward will be the date time, for example like :
<TABLE style="WIDTH: 81pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=108 border=0 x:str><COLGROUP><COL style="WIDTH: 81pt; mso-width-source: userset; mso-width-alt: 3949" width=108><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 81pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" align=right width=108 height=17 x:num="40746.224722222221">2011-07-22 5:23</TD></TR></TBODY></TABLE>

There will have randomly numbers of rows for the same date with different time daily.

For Night shift is 1200am to 830am
For Day shift is from 1200pm to 1830pm

So i will like to do number of count for night and day shift for daily. For example,from B2 To B5 have the date for 2011-07-22 and time between 1200pm to 1830pm listed like "2011-07-22 5:23". So from cells B2 to B5, there are total of 4 counts for day shift.

I will like to do a macro, to count out the number of cells for daily Night and Day shift. Then maybe print out the number of counts for Night and Day for the date on the Other worksheet.

Is there anyway to do the numbers of counts for the same date follow by the timing. Then determine whether it is day or night shift. After that determine the numbers of counts by cells for Night or Day shift for that day.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Really need help with this. Please guide or suggest ways.

Thanks..
 
Last edited:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi,
I do not get what you mean??

If i want to do it in macro, how can i do??

With the current date plus the different timings updated daily,
how can i count the number of cells for the day and night shift?

This is the problem. Because everyday the date will be different.

Well,i need help with this. Thank you

Thankyou for any sugguestion , help me if possible.
 
Upvote 0
Hi,
I do not get what you mean??

If i want to do it in macro, how can i do??

With the current date plus the different timings updated daily,
how can i count the number of cells for the day and night shift?

This is the problem. Because everyday the date will be different.

Well,i need help with this. Thank you

Thankyou for any sugguestion , help me if possible.
I can't help if you want to do this with a macro. Someone else will need to help.
 
Upvote 0
Hi all,

Hello T.Valko, okay i see. Because this is one of my macro project. So i require to complete this task using macro.

Anyone can help me with this?? I really need help with it. I still cannot figure out how to do this in macro.. So i really need help with it and see how can i do it in macro???

Any suggest or help??

Thank you...
 
Last edited:
Upvote 0
I have a list of excel worksheet on Time shift for "Nght" amd "Day". This list will be update everyday.

What i am trying to do :


On column B1 have a header name call shift. Starting from B2 onward will be the date time, for example like :

<TABLE style="WIDTH: 81pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=108 border=0 x:str><COLGROUP><COL style="WIDTH: 81pt; mso-width-source: userset; mso-width-alt: 3949" width=108><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl22 style="BORDER-LEFT-COLOR: #d4d0c8; BORDER-BOTTOM-COLOR: #d4d0c8; WIDTH: 81pt; BORDER-TOP-COLOR: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent; BORDER-RIGHT-COLOR: #d4d0c8" align=right width=108 height=17 x:num="40746.224722222221">2011-07-22 5:23</TD></TR></TBODY></TABLE>


There will have randomly numbers of rows for the same date with different time update daily.

For Night shift is 1200am to 830am
For Day shift is from 1200pm to 1830pm

So i will like to do number of count for night and day shift for daily. For example,from B2 To B5 have the date for 2011-07-22 and time between 1200pm to 1830pm listed like "2011-07-22 5:23". So from cells B2 to B5, there are total of 4 counts for day shift.

I am require to do a macro, to count out the number of cells for daily Night and Day shift. Then maybe print out the number of counts for Night and Day for the date on the Other worksheet.

Is there anyway to do the numbers of counts for the same date follow by the timing. Then determine whether it is day or night shift. After that determine the numbers of counts by cells for Night or Day shift for that day.


This is sort of my mini project. So I require to do a macro for this to complete my task.
Really need help with this. Please guide or suggest ways.
Any similar examples or codes which useful??
Please help..
Thanks..
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,551
Messages
6,179,480
Members
452,915
Latest member
hannnahheileen

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