Add Sequence numbers Based on Dates

arcaidius

Board Regular
Joined
Dec 4, 2018
Messages
97
I have one excel file where data is entered, and then transferred to another excel file with macros. On the second excel file I would like a macro that inputs a sequential number for each day in column A, and a sequential number for each week (or Month if week isn't possible) in column B. The Date is contained in Column D. A formula does not work because the cells are getting pasted over, so I need this to be a macro to enter the Sequence number after the data is pasted from the first work book. The purpose is count the number of things employees are entering each day, week, etc.

Thank you guys for your hep.


[TABLE="width: 193"]
<colgroup><col width="68" style="width: 51pt; mso-width-source: userset; mso-width-alt: 2486;"> <col width="64" style="width: 48pt; mso-width-source: userset; mso-width-alt: 2340;"> <col width="39" style="width: 29pt; mso-width-source: userset; mso-width-alt: 1426;"> <col width="86" style="width: 65pt; mso-width-source: userset; mso-width-alt: 3145;"> <tbody>[TR]
[TD="width: 68, bgcolor: transparent, align: center"]A[/TD]
[TD="width: 64, bgcolor: transparent, align: center"]B[/TD]
[TD="width: 39, bgcolor: transparent, align: center"]C[/TD]
[TD="width: 86, bgcolor: transparent, align: center"]D[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]# Day[/TD]
[TD="bgcolor: transparent, align: center"]# Week[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent, align: center"]Date[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
My 2 cents:
If you are adding sequential numbers to a dataset that are allowed to be changed you are asking for trouble. The number of entries for each day could change, therefore, the macro would have to evaluate all the values over and over again. The best thing to do is create a 3rd table to show the count for each date / week / year.

Without a data set and an example macro, I'm not I could do anything.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,633
Members
452,661
Latest member
Nonhle

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