Saturday, January 10, 2009

How to build List of Day (Sun, Mon, Tue) continuously

Happy New Year 2009... there will be lots more post the year.

Recently I am doing my macro project on Yearly Attendance Leave Chart (in Ms Excel). One of the logic is to assign day for each date and to identify Saturday and Sunday, so that it will be highlighted as different color in the chart. The issue now is how to identify Sunday & Saturday the fastest way instead of assign it manually. Here is the way;
1. Build list of date
i. Key in 1st date ex 01/01/09 (DD/MM/YR) - cell(A2)
ii. Key in 2nd date ex 02/01/09 (DD/MM/YR) - cell(A3)
iii. Select both cells, place the cursor at the right corner of the selection till the cursor mark as
"+" and drag cell downwards.
2. Build list of day
i. Key in 1st day ex Thursday - cell(B2)
ii. Key in 2nd day ex Friday - cell(B3)
iii. Select both cells, place the cursor at the right corner of the selection till the cursor mark as
"+" and drag cell downwards.
tips: Fastest way, once (+) appear, double click the (+) sign, the list will be copied to the
following cell following the trend of selected cells.

Next posting : Video how to perform this post.

No comments:

Post a Comment