Skip weekends while autofilling dates in excel

By Chandoo at 30 June, 2008, 7:23 pm



skip-weekends-while-filling-dates-ms-excel-autofillOften you may want to fill a column only with weekday dates instead of all dates. Here is a simple trick you can use instead of writing nifty if formulas or manually entering the weekday dates.

When you auto fill dates by dragging mouse (or using menu > edit > fill > series > selecting “type: date”), just use weekdays only option as shown below.

fill-weekdays-dates-in-excel-only-howto

Now you dont have to create project plans with weekends in it :)





Categories : Excel Tips | hacks | technology
Tagged with: | | | | | | |

Did you enjoy reading this post? If so, give me some love

Subscribe to Pointy Haired Dilbert - Chandoo.org - RSS FeedSave to Delicious by bookmarking this post Stumble this post  


Consider subscribing to my newsletter every weekday I will send you one email with hot excel tips, technology tidbits or business insights that can make you more productive. Each mail will have unsubscribe link so you can stop receiving the mails at any time you wish.



Trackbacks & Pingbacks

Comments
Deep August 29, 2008

Hi,

I am using MS Office 2007 and for some reason, it does not show me these options. It just shows me 3 options:

Copy Cell (Not sure about the exact text)
Copy with Formatting
Copy without Formatting

Any idea how to get those options up?

Regards,
Deep

Chandoo August 29, 2008

@Deep : I am not so well versed with 2007, but here is how you can do this using menus:

enter first date of the series
select the range you want to fill
go to menu > edit > fill > series
in the dialog, select date as the series type and “weekdays only” option
press ok…

Let me know if this doesnt work…

Deep August 29, 2008

Now that was FAST!!!

I tried it but unfortunately it didn’t work..

Here is the screenshot:

http://img291.imageshack.us/img291/6573/excelsheetyr2.gif

This is what I tried..

I put the date in one row, in another row, added some calculations (as you can see in the image) and drag the content in other rows..

I could not find any Edit menu so i just clicked on the icon as you have shown in the 2nd image..

I hope I did the right thing…

Chandoo August 30, 2008

Hmm…
there should be an edit menu as far as I know. Let me check that…

meanwhile… if it works you can use formulas to fill the series.

1. just enter the first date
2. in the 2nd row, enter a formula like =if(weekday(firstdatecell,2)=6,firstdatecell+2, firstdatecell+1)
3. copy the formula over the rest of the range…

Robert August 30, 2008

@Deep:

you have to use the autofill handle, the small box at the lower right of the active cell. Right click on the autofill handle and drag down to the cells you want to autofill. A menu pops up showing the weekdays only option and others.

Deep August 30, 2008

@Chandoo - Thanks but it did not work with my calculations. :(

@Robert - Yes, it worked this time but I guess, in my case it won’t work as I want to add up the days from the column on the left. (As shown in the image)

Basically this is what I want:

1. I want to define project start date
2. There are no. of days assigned for each module
3. I want excel to calculate the date automatically. (By adding up the no. of days and deducting the weekends)

Any kind of help is appriciated.

Reagrds,
Deep

Robert August 30, 2008

@Deep,

sorry, I misunderstood your question, I thought you would be searching for the autofill-function only (values).

If I got your request corrctly now, you could use the WORKDAY-function, returning the date before or after a specified number of workdays.

In Excel 2003 and earlier the Add-In Analysis Toolpak has to be installed, but since you are using 2007, it should work immediately.

Chandoo August 30, 2008

@Deep.. as Robert suggested, Workday is what you should be using. It will calculate future date based number of working days you want to add to input date. Also, you can use this with your own list of holidays.

Deep August 30, 2008

Thanks Robert, Chandoo.. I will try the things.. :)

Deep September 1, 2008

I tried it and this time it worked.. Thanks to both of you.. you guys made my life much more easier :)

RSS feed for comments on this post. TrackBack URI

Leave a comment

   Name (required)

   E-mail (required, never displayed)

   URL